Adding a debug flag to prevent broken downlodas from getting removed during
restore
After setting this flag apps do not need to have an active settion during restore
which would simplyfy debugging backup-restore bugs.
Change-Id: I89f2d3ec677281887f8bab8559ace991709caadc
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 1607a4a..59c823b 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -103,7 +103,6 @@
implements LauncherAppsCompat.OnAppsChangedCallbackCompat {
static final boolean DEBUG_LOADERS = false;
private static final boolean DEBUG_RECEIVER = false;
- private static final boolean REMOVE_UNRESTORED_ICONS = true;
static final String TAG = "Launcher.Model";
@@ -1881,12 +1880,12 @@
restored = false;
itemReplaced = true;
- } else if (REMOVE_UNRESTORED_ICONS) {
+ } else {
FileLog.d(TAG, "Unrestored package removed: " + cn);
itemsToRemove.add(id);
continue;
}
- } else if (REMOVE_UNRESTORED_ICONS) {
+ } else {
FileLog.d(TAG, "Unrestored package removed: " + cn);
itemsToRemove.add(id);
continue;
@@ -2168,7 +2167,7 @@
// App restore has started. Update the flag
appWidgetInfo.restoreStatus |=
LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
- } else if (REMOVE_UNRESTORED_ICONS && !isSafeMode) {
+ } else if (!isSafeMode) {
FileLog.d(TAG, "Unrestored widget removed: " + component);
itemsToRemove.add(id);
continue;