summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-28 17:26:48 (GMT)
committerSunny Goyal <sunnygoyal@google.com>2015-08-28 17:27:41 (GMT)
commita8b244e5b83e4e773411c134c7a8df2a2392fb44 (patch)
tree6db2937af2498049de921660db3cf52e6dce381b
parentebfae6e266590d04702441ed630704c5eb4ccaaa (diff)
downloadandroid_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.zip
android_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.tar.gz
android_packages_apps_Trebuchet-a8b244e5b83e4e773411c134c7a8df2a2392fb44.tar.bz2
Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
Bug: 23515512 Change-Id: I60678eccd4b60225ff30960f7197d633f72c7659
-rw-r--r--src/com/android/launcher3/IconCache.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index ea1c0fd..59ab839 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";