Make exception for TASKBAR_PINNING so it is boot aware.
Bug: 251502424
Test: No launcher exceptions where thrown when TASKBAR_PINNING feature
is enabled.
Change-Id: I7e71d37547af1951938c6d5e77325d5e8e6b9fbd
diff --git a/src/com/android/launcher3/LauncherPrefs.kt b/src/com/android/launcher3/LauncherPrefs.kt
index 36d37c7..00bac1c 100644
--- a/src/com/android/launcher3/LauncherPrefs.kt
+++ b/src/com/android/launcher3/LauncherPrefs.kt
@@ -59,8 +59,12 @@
IS_STARTUP_DATA_MIGRATED.defaultValue
)
+ // TODO: Remove `item == TASKBAR_PINNING` once isBootAwareStartupDataEnabled is always true
private fun chooseSharedPreferences(item: Item): SharedPreferences =
- if (isBootAwareStartupDataEnabled && item.isBootAware && isStartupDataMigrated)
+ if (
+ (isBootAwareStartupDataEnabled && item.isBootAware && isStartupDataMigrated) ||
+ item == TASKBAR_PINNING
+ )
bootAwarePrefs
else item.encryptedPrefs