Loading src/com/android/launcher3/model/AllAppsList.java +7 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.LauncherActivityInfo; import android.content.pm.LauncherApps; import android.os.LocaleList; import android.os.Process; import android.os.UserHandle; import android.util.Log; Loading Loading @@ -161,7 +162,7 @@ public class AllAppsList { /** Updates the given PackageInstallInfo's associated AppInfo's installation info. */ public List<AppInfo> updatePromiseInstallInfo(PackageInstallInfo installInfo) { List<AppInfo> updatedAppInfos = new ArrayList<>(); UserHandle user = installInfo.user; UserHandle user = Process.myUserHandle(); for (int i = data.size() - 1; i >= 0; i--) { final AppInfo appInfo = data.get(i); final ComponentName tgtComp = appInfo.getTargetComponent(); Loading @@ -169,6 +170,10 @@ public class AllAppsList { && appInfo.user.equals(user)) { if (installInfo.state == PackageInstallInfo.STATUS_INSTALLED_DOWNLOADING || installInfo.state == PackageInstallInfo.STATUS_INSTALLING) { if (appInfo.isAppStartable() && installInfo.state == PackageInstallInfo.STATUS_INSTALLING) { continue; } appInfo.setProgressLevel(installInfo); updatedAppInfos.add(appInfo); Loading src/com/android/launcher3/model/PackageUpdatedTask.java +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.launcher3.logging.FileLog; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.pm.PackageInstallInfo; import com.android.launcher3.pm.UserCache; import com.android.launcher3.shortcuts.ShortcutRequest; import com.android.launcher3.util.FlagOp; Loading Loading @@ -246,6 +247,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask { if (isNewApkAvailable && si.itemType == Favorites.ITEM_TYPE_APPLICATION) { si.setProgressLevel(100, PackageInstallInfo.STATUS_INSTALLED); iconCache.getTitleAndIcon(si, si.usingLowResIcon()); infoUpdated = true; } Loading src/com/android/launcher3/model/data/AppInfo.java +1 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,6 @@ public class AppInfo extends ItemInfoWithIcon { componentName = info.componentName; title = Utilities.trim(info.title); intent = new Intent(info.intent); user = info.user; runtimeStatusFlags = info.runtimeStatusFlags; } @VisibleForTesting Loading @@ -114,6 +112,7 @@ public class AppInfo extends ItemInfoWithIcon { .setComponent(componentName) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); setProgressLevel(installInfo); user = installInfo.user; } Loading src/com/android/launcher3/model/data/ItemInfoWithIcon.java +4 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,9 @@ public abstract class ItemInfoWithIcon extends ItemInfo { protected ItemInfoWithIcon(ItemInfoWithIcon info) { super(info); bitmap = info.bitmap; mProgressLevel = info.mProgressLevel; runtimeStatusFlags = info.runtimeStatusFlags; user = info.user; } @Override Loading Loading @@ -195,8 +197,8 @@ public abstract class ItemInfoWithIcon extends ItemInfo { : runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; } else { mProgressLevel = status == PackageInstallInfo.STATUS_INSTALLED ? 100 : 0; runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INSTALL_SESSION_ACTIVE; runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; runtimeStatusFlags &= ~FLAG_INSTALL_SESSION_ACTIVE; runtimeStatusFlags &= ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; } } Loading Loading
src/com/android/launcher3/model/AllAppsList.java +7 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.LauncherActivityInfo; import android.content.pm.LauncherApps; import android.os.LocaleList; import android.os.Process; import android.os.UserHandle; import android.util.Log; Loading Loading @@ -161,7 +162,7 @@ public class AllAppsList { /** Updates the given PackageInstallInfo's associated AppInfo's installation info. */ public List<AppInfo> updatePromiseInstallInfo(PackageInstallInfo installInfo) { List<AppInfo> updatedAppInfos = new ArrayList<>(); UserHandle user = installInfo.user; UserHandle user = Process.myUserHandle(); for (int i = data.size() - 1; i >= 0; i--) { final AppInfo appInfo = data.get(i); final ComponentName tgtComp = appInfo.getTargetComponent(); Loading @@ -169,6 +170,10 @@ public class AllAppsList { && appInfo.user.equals(user)) { if (installInfo.state == PackageInstallInfo.STATUS_INSTALLED_DOWNLOADING || installInfo.state == PackageInstallInfo.STATUS_INSTALLING) { if (appInfo.isAppStartable() && installInfo.state == PackageInstallInfo.STATUS_INSTALLING) { continue; } appInfo.setProgressLevel(installInfo); updatedAppInfos.add(appInfo); Loading
src/com/android/launcher3/model/PackageUpdatedTask.java +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.launcher3.logging.FileLog; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.pm.PackageInstallInfo; import com.android.launcher3.pm.UserCache; import com.android.launcher3.shortcuts.ShortcutRequest; import com.android.launcher3.util.FlagOp; Loading Loading @@ -246,6 +247,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask { if (isNewApkAvailable && si.itemType == Favorites.ITEM_TYPE_APPLICATION) { si.setProgressLevel(100, PackageInstallInfo.STATUS_INSTALLED); iconCache.getTitleAndIcon(si, si.usingLowResIcon()); infoUpdated = true; } Loading
src/com/android/launcher3/model/data/AppInfo.java +1 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,6 @@ public class AppInfo extends ItemInfoWithIcon { componentName = info.componentName; title = Utilities.trim(info.title); intent = new Intent(info.intent); user = info.user; runtimeStatusFlags = info.runtimeStatusFlags; } @VisibleForTesting Loading @@ -114,6 +112,7 @@ public class AppInfo extends ItemInfoWithIcon { .setComponent(componentName) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); setProgressLevel(installInfo); user = installInfo.user; } Loading
src/com/android/launcher3/model/data/ItemInfoWithIcon.java +4 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,9 @@ public abstract class ItemInfoWithIcon extends ItemInfo { protected ItemInfoWithIcon(ItemInfoWithIcon info) { super(info); bitmap = info.bitmap; mProgressLevel = info.mProgressLevel; runtimeStatusFlags = info.runtimeStatusFlags; user = info.user; } @Override Loading Loading @@ -195,8 +197,8 @@ public abstract class ItemInfoWithIcon extends ItemInfo { : runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; } else { mProgressLevel = status == PackageInstallInfo.STATUS_INSTALLED ? 100 : 0; runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INSTALL_SESSION_ACTIVE; runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; runtimeStatusFlags &= ~FLAG_INSTALL_SESSION_ACTIVE; runtimeStatusFlags &= ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE; } } Loading