diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-08-28 10:26:48 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-08-28 10:27:41 -0700 |
commit | a8b244e5b83e4e773411c134c7a8df2a2392fb44 (patch) | |
tree | 6db2937af2498049de921660db3cf52e6dce381b /src/com/android/launcher3 | |
parent | ebfae6e266590d04702441ed630704c5eb4ccaaa (diff) | |
download | android_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.tar.gz android_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.tar.bz2 android_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.zip |
Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
Bug: 23515512
Change-Id: I60678eccd4b60225ff30960f7197d633f72c7659
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/IconCache.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index ea1c0fd3e..59ab8397d 100644 --- a/src/com/android/launcher3/IconCache.java +++ b/src/com/android/launcher3/IconCache.java @@ -616,7 +616,9 @@ public class IconCache { // Check the DB first. if (!getEntryFromDB(cacheKey, entry, useLowResIcon)) { try { - PackageInfo info = mPackageManager.getPackageInfo(packageName, 0); + int flags = UserHandleCompat.myUserHandle().equals(user) ? 0 : + PackageManager.GET_UNINSTALLED_PACKAGES; + PackageInfo info = mPackageManager.getPackageInfo(packageName, flags); ApplicationInfo appInfo = info.applicationInfo; if (appInfo == null) { throw new NameNotFoundException("ApplicationInfo is null"); @@ -787,7 +789,7 @@ public class IconCache { } private static final class IconDB extends SQLiteOpenHelper { - private final static int DB_VERSION = 6; + private final static int DB_VERSION = 7; private final static String TABLE_NAME = "icons"; private final static String COLUMN_ROWID = "rowid"; |