diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-03-01 17:27:16 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-03-01 17:38:12 -0800 |
commit | f2db25398a029b6f13afccbec331e35c8007dde6 (patch) | |
tree | f00fd4b41dfc5513459a31722a591a76d6cabc8d /src/com/android/launcher3/compat/LauncherAppsCompatVL.java | |
parent | ed7bef195cc1a0363d205df52a7ae6555bfcdaf7 (diff) | |
download | android_packages_apps_Trebuchet-f2db25398a029b6f13afccbec331e35c8007dde6.tar.gz android_packages_apps_Trebuchet-f2db25398a029b6f13afccbec331e35c8007dde6.tar.bz2 android_packages_apps_Trebuchet-f2db25398a029b6f13afccbec331e35c8007dde6.zip |
Fixing wrong check being used for application status
Earlier we were relying on activity list to check is an app is
installed or not. It fails if the app only exposes widgets and
no visible activity. Hence dragging an icon to AppInfo sometimes
causes the icon to get disappear.
Bug: 33241335
Change-Id: Ieb71e298a0930dd0a831cf09bd1e998514a427fd
Diffstat (limited to 'src/com/android/launcher3/compat/LauncherAppsCompatVL.java')
-rw-r--r-- | src/com/android/launcher3/compat/LauncherAppsCompatVL.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java index e5517a6c6..459017392 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java @@ -81,7 +81,8 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat { mContext.getPackageManager().getApplicationInfo(packageName, flags); // There is no way to check if the app is installed for managed profile. But for // primary profile, we can still have this check. - if (isPrimaryUser && ((info.flags & ApplicationInfo.FLAG_INSTALLED) == 0)) { + if (isPrimaryUser && ((info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) + || !info.enabled) { return null; } return info; |