Add Logs to track app uninstall and icon removal

Some users are affected by a bug that keeps orphaned app icons after a
package is uninstalled. Since we are unable to pinpoint to what exactly
is causing this, we're adding logs so we could tell where exactly things
are failing.

Bug: 124817089
Change-Id: If168935115a7d323fd60c2b19426c1dbd43dbce3
This commit is contained in:
Samuel Fufa
2019-09-06 16:19:11 -07:00
parent 478414a7c3
commit cc1e1075bb
4 changed files with 16 additions and 5 deletions

View File

@@ -15,6 +15,8 @@
*/
package com.android.launcher3.model;
import static com.android.launcher3.WorkspaceItemInfo.FLAG_AUTOINSTALL_ICON;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -53,8 +55,6 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import static com.android.launcher3.WorkspaceItemInfo.FLAG_AUTOINSTALL_ICON;
/**
* Handles updates due to changes in package manager (app installed/updated/removed)
* or when a user availability changes.
@@ -132,6 +132,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
break;
case OP_REMOVE: {
for (int i = 0; i < N; i++) {
FileLog.d(TAG, "Removing app icon" + packages[i]);
iconCache.removeIconsForPkg(packages[i], mUser);
}
// Fall through