Permanently provide functionality for LauncherPref items that don't need

to be migrated, but are boot aware.

Bug: 251502424
Test: Tested that Migration works as expected, as well as shared
preference information that doesn't need to be migrated. Also sanity
tested phone in general.

Change-Id: Ie8460e360856cbe20a7770b1747f75c7154759ab
This commit is contained in:
Stefan Andonian
2023-09-29 23:41:26 +00:00
parent e8f7dd5a51
commit 54495f3018
6 changed files with 147 additions and 75 deletions

View File

@@ -54,6 +54,7 @@ import com.android.launcher3.AutoInstallsLayout;
import com.android.launcher3.AutoInstallsLayout.SourceResources;
import com.android.launcher3.ConstantItem;
import com.android.launcher3.DefaultLayoutParser;
import com.android.launcher3.EncryptionType;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherFiles;
@@ -499,11 +500,11 @@ public class ModelDbController {
private ConstantItem<Boolean> getEmptyDbCreatedKey(String dbName) {
if (mContext instanceof SandboxContext) {
return LauncherPrefs.nonRestorableItem(EMPTY_DATABASE_CREATED,
false /* default value */, false /* boot aware */);
false /* default value */, EncryptionType.ENCRYPTED);
}
String key = TextUtils.equals(dbName, LauncherFiles.LAUNCHER_DB)
? EMPTY_DATABASE_CREATED : EMPTY_DATABASE_CREATED + "@" + dbName;
return LauncherPrefs.backedUpItem(key, false /* default value */, false /* boot aware */);
return LauncherPrefs.backedUpItem(key, false /* default value */, EncryptionType.ENCRYPTED);
}
/**