Loading protos/backup.proto +8 −4 Original line number Diff line number Diff line Loading @@ -108,4 +108,8 @@ message Widget { optional bool configure = 3; optional Resource icon = 4; optional Resource preview = 5; // Assume that a widget is resizable upto 2x2 if no data is available optional int32 minSpanX = 6 [default = 2]; optional int32 minSpanY = 7 [default = 2]; } src/com/android/launcher3/LauncherBackupAgentHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper { LauncherClings.synchonouslyMarkFirstRunClingDismissed(this); // TODO: Update the backup set to include rank. if (mHelper.restoredBackupVersion <= 2) { if (mHelper.restoredBackupVersion <= 3) { LauncherAppState.getLauncherProvider().updateFolderItemsRank(); } } else { Loading src/com/android/launcher3/LauncherBackupHelper.java +8 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import android.app.backup.BackupDataInputStream; import android.app.backup.BackupDataOutput; import android.app.backup.BackupHelper; import android.app.backup.BackupManager; import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; import android.content.ContentResolver; import android.content.ContentValues; Loading Loading @@ -58,7 +57,6 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.zip.CRC32; Loading @@ -70,7 +68,7 @@ public class LauncherBackupHelper implements BackupHelper { private static final boolean VERBOSE = LauncherBackupAgentHelper.VERBOSE; private static final boolean DEBUG = LauncherBackupAgentHelper.DEBUG; private static final int BACKUP_VERSION = 2; private static final int BACKUP_VERSION = 3; private static final int MAX_JOURNAL_SIZE = 1000000; // Journal key is such that it is always smaller than any dynamically generated Loading Loading @@ -171,6 +169,7 @@ public class LauncherBackupHelper implements BackupHelper { mExistingKeys.add(keyToBackupKey(key)); } } restoredBackupVersion = journal.backupVersion; } /** Loading Loading @@ -313,7 +312,6 @@ public class LauncherBackupHelper implements BackupHelper { MessageNano.mergeFrom(journal, readCheckedBytes(mBuffer, dataSize)); applyJournal(journal); restoreSuccessful = isBackupCompatible(journal); restoredBackupVersion = journal.backupVersion; return; } Loading Loading @@ -639,7 +637,7 @@ public class LauncherBackupHelper implements BackupHelper { } else { Log.w(TAG, "empty intent on appwidget: " + id); } if (mExistingKeys.contains(backupKey)) { if (mExistingKeys.contains(backupKey) && restoredBackupVersion >= BACKUP_VERSION) { if (DEBUG) Log.d(TAG, "already saved widget " + backupKey); // remember that we already backed this up previously Loading Loading @@ -942,6 +940,11 @@ public class LauncherBackupHelper implements BackupHelper { widget.preview.dpi = dpi; } } widget.minSpanX = (info.resizeMode & LauncherAppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0 ? info.minSpanX : -1; widget.minSpanY = (info.resizeMode & LauncherAppWidgetProviderInfo.RESIZE_VERTICAL) != 0 ? info.minSpanY : -1; return widget; } Loading Loading
protos/backup.proto +8 −4 Original line number Diff line number Diff line Loading @@ -108,4 +108,8 @@ message Widget { optional bool configure = 3; optional Resource icon = 4; optional Resource preview = 5; // Assume that a widget is resizable upto 2x2 if no data is available optional int32 minSpanX = 6 [default = 2]; optional int32 minSpanY = 7 [default = 2]; }
src/com/android/launcher3/LauncherBackupAgentHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper { LauncherClings.synchonouslyMarkFirstRunClingDismissed(this); // TODO: Update the backup set to include rank. if (mHelper.restoredBackupVersion <= 2) { if (mHelper.restoredBackupVersion <= 3) { LauncherAppState.getLauncherProvider().updateFolderItemsRank(); } } else { Loading
src/com/android/launcher3/LauncherBackupHelper.java +8 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import android.app.backup.BackupDataInputStream; import android.app.backup.BackupDataOutput; import android.app.backup.BackupHelper; import android.app.backup.BackupManager; import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; import android.content.ContentResolver; import android.content.ContentValues; Loading Loading @@ -58,7 +57,6 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.zip.CRC32; Loading @@ -70,7 +68,7 @@ public class LauncherBackupHelper implements BackupHelper { private static final boolean VERBOSE = LauncherBackupAgentHelper.VERBOSE; private static final boolean DEBUG = LauncherBackupAgentHelper.DEBUG; private static final int BACKUP_VERSION = 2; private static final int BACKUP_VERSION = 3; private static final int MAX_JOURNAL_SIZE = 1000000; // Journal key is such that it is always smaller than any dynamically generated Loading Loading @@ -171,6 +169,7 @@ public class LauncherBackupHelper implements BackupHelper { mExistingKeys.add(keyToBackupKey(key)); } } restoredBackupVersion = journal.backupVersion; } /** Loading Loading @@ -313,7 +312,6 @@ public class LauncherBackupHelper implements BackupHelper { MessageNano.mergeFrom(journal, readCheckedBytes(mBuffer, dataSize)); applyJournal(journal); restoreSuccessful = isBackupCompatible(journal); restoredBackupVersion = journal.backupVersion; return; } Loading Loading @@ -639,7 +637,7 @@ public class LauncherBackupHelper implements BackupHelper { } else { Log.w(TAG, "empty intent on appwidget: " + id); } if (mExistingKeys.contains(backupKey)) { if (mExistingKeys.contains(backupKey) && restoredBackupVersion >= BACKUP_VERSION) { if (DEBUG) Log.d(TAG, "already saved widget " + backupKey); // remember that we already backed this up previously Loading Loading @@ -942,6 +940,11 @@ public class LauncherBackupHelper implements BackupHelper { widget.preview.dpi = dpi; } } widget.minSpanX = (info.resizeMode & LauncherAppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0 ? info.minSpanX : -1; widget.minSpanY = (info.resizeMode & LauncherAppWidgetProviderInfo.RESIZE_VERTICAL) != 0 ? info.minSpanY : -1; return widget; } Loading