Make sure loading icons from db for archived apps only happens once after restore.
- This is to enable users to theme and shape archived apps Bug: 402303619 Flag: com.android.launcher3.restore_archived_app_icons_from_db Test: performing restore and toggling themed icons on/off Change-Id: I5883f703c3b0c8df5ee303ea4d99b0c02743faa4
This commit is contained in:
1 parent
500698152c
commit
ca9a920fa9
2 files changed
+28
-2
No files matched your search
@@ -45,6 +45,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherModel;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.Workspace;
|
||||
@@ -421,7 +422,8 @@ public class LoaderCursor extends CursorWrapper {
|
||||
) {
|
||||
boolean isPreArchived = Flags.enableSupportForArchiving()
|
||||
&& Flags.restoreArchivedAppIconsFromDb()
|
||||
&& info.isInactiveArchive();
|
||||
&& info.isInactiveArchive()
|
||||
&& LauncherPrefs.get(mContext).get(LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE);
|
||||
boolean preArchivedIconNotFound = isPreArchived && !loadIconFromDb(info);
|
||||
if (preArchivedIconNotFound) {
|
||||
Log.d(TAG, "loadIconFromDb failed for pre-archived icon, loading from cache."
|
||||
|
||||
Reference in new issue
Block a user