Don't modify invariant device profile
We flag guard the code that modifies IDP as that's not needed with one grid, and we don't want to modify idp outside of it Bug: 332974074 Flag: com.android.launcher3.one_grid_specs Test: verified manually with b&r Change-Id: Ica2ffa79638fa693cde421adb13feebb0d09cbc4
This commit is contained in:
1 parent
849d204c71
commit
c07bf539ee
2 files changed
+8
-4
No files matched your search
@@ -51,6 +51,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherFiles;
|
||||
@@ -130,9 +131,11 @@ public class RestoreDbTask {
|
||||
removeOldDBs(context, oldPhoneFileName);
|
||||
// The idp before this contains data about the old phone, after this it becomes the idp
|
||||
// of the current phone.
|
||||
FileLog.d(TAG, "Resetting IDP to default for restore dest device");
|
||||
idp.reset(context);
|
||||
trySettingPreviousGridAsCurrent(context, idp, oldPhoneFileName, previousDbs);
|
||||
if (!Flags.oneGridSpecs()) {
|
||||
FileLog.d(TAG, "Resetting IDP to default for restore dest device");
|
||||
idp.reset(context);
|
||||
trySettingPreviousGridAsCurrent(context, idp, oldPhoneFileName, previousDbs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user