mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Fix incorrect launcher loading.
Apps that were installed and downloading incrementally would be shown as fully downloaded on reboot. Updated LoaderTask and AppInfo.updateRuntimeFlagsForActivityTarget to account for this.
Fixes: 178528867
Test: manual with hardcoded values
Change-Id: I088e43ae886b4157bad9f4fa8d40373cf7f8235a
(cherry picked from commit 6d0fec8ac7)
This commit is contained in:
@@ -588,27 +588,26 @@ public class LoaderTask implements Runnable {
|
||||
if (isSafeMode && !isSystemApp(context, intent)) {
|
||||
info.runtimeStatusFlags |= FLAG_DISABLED_SAFEMODE;
|
||||
}
|
||||
LauncherActivityInfo activityInfo = c.getLauncherActivityInfo();
|
||||
if (activityInfo != null) {
|
||||
info.setProgressLevel(
|
||||
PackageManagerHelper
|
||||
.getLoadingProgress(activityInfo),
|
||||
PackageInstallInfo.STATUS_INSTALLED_DOWNLOADING);
|
||||
}
|
||||
|
||||
if (c.restoreFlag != 0 && !TextUtils.isEmpty(targetPkg)) {
|
||||
tempPackageKey.update(targetPkg, c.user);
|
||||
SessionInfo si = installingPkgs.get(tempPackageKey);
|
||||
LauncherActivityInfo activityInfo =
|
||||
c.getLauncherActivityInfo();
|
||||
if (si == null) {
|
||||
info.runtimeStatusFlags &=
|
||||
~ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
~ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
} else if (activityInfo == null) {
|
||||
int installProgress = (int) (si.getProgress() * 100);
|
||||
|
||||
info.setProgressLevel(
|
||||
installProgress,
|
||||
PackageInstallInfo.STATUS_INSTALLING);
|
||||
} else {
|
||||
info.setProgressLevel(
|
||||
PackageManagerHelper
|
||||
.getLoadingProgress(activityInfo),
|
||||
PackageInstallInfo
|
||||
.STATUS_INSTALLED_DOWNLOADING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user