mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Fixed app shortcut widget
- closes : #5101 - closes : #5056 - closes : #5055
This commit is contained in:
@@ -731,24 +731,20 @@ public class LoaderTask implements Runnable {
|
||||
LauncherActivityInfo app = apps.get(i);
|
||||
AppInfo appInfo = new AppInfo(app, mUserCache.getUserInfo(user),
|
||||
ApiWrapper.INSTANCE.get(mApp.getContext()), mPmHelper, quietMode);
|
||||
boolean isArchived;
|
||||
try {
|
||||
isArchived = app.getApplicationInfo().isArchived;
|
||||
} catch (NoSuchFieldError e) {
|
||||
isArchived = false;
|
||||
}
|
||||
if (Flags.enableSupportForArchiving() && isArchived) {
|
||||
// For archived apps, include progress info in case there is a pending
|
||||
// install session post restart of device.
|
||||
String appPackageName = app.getApplicationInfo().packageName;
|
||||
SessionInfo si = mInstallingPkgsCached != null ? mInstallingPkgsCached.get(
|
||||
new PackageUserKey(appPackageName, user))
|
||||
: mSessionHelper.getActiveSessionInfo(user,
|
||||
appPackageName);
|
||||
if (si != null) {
|
||||
appInfo.runtimeStatusFlags |= FLAG_INSTALL_SESSION_ACTIVE;
|
||||
appInfo.setProgressLevel((int) (si.getProgress() * 100),
|
||||
PackageInstallInfo.STATUS_INSTALLING);
|
||||
if (Flags.enableSupportForArchiving()) {
|
||||
if (app.getApplicationInfo().isArchived) {
|
||||
// For archived apps, include progress info in case there is a pending
|
||||
// install session post restart of device.
|
||||
String appPackageName = app.getApplicationInfo().packageName;
|
||||
SessionInfo si = mInstallingPkgsCached != null ? mInstallingPkgsCached.get(
|
||||
new PackageUserKey(appPackageName, user))
|
||||
: mSessionHelper.getActiveSessionInfo(user,
|
||||
appPackageName);
|
||||
if (si != null) {
|
||||
appInfo.runtimeStatusFlags |= FLAG_INSTALL_SESSION_ACTIVE;
|
||||
appInfo.setProgressLevel((int) (si.getProgress() * 100),
|
||||
PackageInstallInfo.STATUS_INSTALLING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user