mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Key by both package and user for list of active install sessions. am: c1322b6ac8
am: bf7371e510
Change-Id: I7b18a068f88ec3aef84d04d80b54f6252230bbc8
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.launcher3.model;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_LOCKED_USER;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SAFEMODE;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED;
|
||||
import static com.android.launcher3.compat.PackageInstallerCompat.getUserHandle;
|
||||
import static com.android.launcher3.model.LoaderResults.filterCurrentWorkspaceItems;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
import static com.android.launcher3.util.PackageManagerHelper.isSystemApp;
|
||||
@@ -75,6 +76,7 @@ import com.android.launcher3.util.IOUtils;
|
||||
import com.android.launcher3.util.LooperIdleLock;
|
||||
import com.android.launcher3.util.MultiHashMap;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
import com.android.launcher3.util.TraceHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -295,8 +297,9 @@ public class LoaderTask implements Runnable {
|
||||
synchronized (mBgDataModel) {
|
||||
mBgDataModel.clear();
|
||||
|
||||
final HashMap<String, SessionInfo> installingPkgs =
|
||||
final HashMap<PackageUserKey, SessionInfo> installingPkgs =
|
||||
mPackageInstaller.updateAndGetActiveSessionCache();
|
||||
final PackageUserKey tempPackageKey = new PackageUserKey(null, null);
|
||||
mFirstScreenBroadcast = new FirstScreenBroadcast(installingPkgs);
|
||||
|
||||
Map<ShortcutKey, ShortcutInfo> shortcutKeyToPinnedShortcuts = new HashMap<>();
|
||||
@@ -433,9 +436,10 @@ public class LoaderTask implements Runnable {
|
||||
// installed later.
|
||||
FileLog.d(TAG, "package not yet restored: " + targetPkg);
|
||||
|
||||
tempPackageKey.update(targetPkg, c.user);
|
||||
if (c.hasRestoreFlag(WorkspaceItemInfo.FLAG_RESTORE_STARTED)) {
|
||||
// Restore has started once.
|
||||
} else if (installingPkgs.containsKey(targetPkg)) {
|
||||
} else if (installingPkgs.containsKey(tempPackageKey)) {
|
||||
// App restore has started. Update the flag
|
||||
c.restoreFlag |= WorkspaceItemInfo.FLAG_RESTORE_STARTED;
|
||||
c.updater().put(LauncherSettings.Favorites.RESTORED,
|
||||
|
||||
Reference in New Issue
Block a user