From 939d5f876b6bb0bfe550c591e9f07be4ce44b9b1 Mon Sep 17 00:00:00 2001 From: Stefan Andonian Date: Mon, 25 Sep 2023 18:07:43 +0000 Subject: [PATCH] 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 --- src/com/android/launcher3/LauncherPrefs.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/LauncherPrefs.kt b/src/com/android/launcher3/LauncherPrefs.kt index 36d37c7b62..00bac1c78c 100644 --- a/src/com/android/launcher3/LauncherPrefs.kt +++ b/src/com/android/launcher3/LauncherPrefs.kt @@ -59,8 +59,12 @@ class LauncherPrefs(private val encryptedContext: Context) { 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