Loading src/com/android/launcher3/InvariantDeviceProfile.java +9 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,15 @@ public class InvariantDeviceProfile { return displayOption.grid.name; } /** * @deprecated This is a temporary solution because on the backup and restore case we modify the * IDP, this resets it. b/332974074 */ @Deprecated public void reset(Context context) { initGrid(context, getCurrentGridName(context)); } @VisibleForTesting public static String getDefaultGridName(Context context) { return new InvariantDeviceProfile().initGrid(context, null); Loading src/com/android/launcher3/provider/RestoreDbTask.java +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ public class RestoreDbTask { if (Flags.enableNarrowGridRestore()) { String oldPhoneFileName = idp.dbFile; removeOldDBs(context, oldPhoneFileName); // The idp before this contains data about the old phone, after this it becomes the idp // of the current phone. idp.reset(context); trySettingPreviousGidAsCurrent(context, idp, oldPhoneFileName); } else { idp.reinitializeAfterRestore(context); Loading Loading
src/com/android/launcher3/InvariantDeviceProfile.java +9 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,15 @@ public class InvariantDeviceProfile { return displayOption.grid.name; } /** * @deprecated This is a temporary solution because on the backup and restore case we modify the * IDP, this resets it. b/332974074 */ @Deprecated public void reset(Context context) { initGrid(context, getCurrentGridName(context)); } @VisibleForTesting public static String getDefaultGridName(Context context) { return new InvariantDeviceProfile().initGrid(context, null); Loading
src/com/android/launcher3/provider/RestoreDbTask.java +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ public class RestoreDbTask { if (Flags.enableNarrowGridRestore()) { String oldPhoneFileName = idp.dbFile; removeOldDBs(context, oldPhoneFileName); // The idp before this contains data about the old phone, after this it becomes the idp // of the current phone. idp.reset(context); trySettingPreviousGidAsCurrent(context, idp, oldPhoneFileName); } else { idp.reinitializeAfterRestore(context); Loading