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
This commit is contained in:
Sunny Goyal
2016-08-29 10:06:57 -07:00
parent 4a4b49ff34
commit b05a00a441
2 changed files with 18 additions and 9 deletions

View File

@@ -103,7 +103,6 @@ public class LauncherModel extends BroadcastReceiver
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 @@ public class LauncherModel extends BroadcastReceiver
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 @@ public class LauncherModel extends BroadcastReceiver
// 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;