summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-28 21:16:03 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-28 21:16:03 (GMT)
commit066bcc05fb97843dab518e0bc70ae766ed3edf28 (patch)
tree198f1d232975806f0c28cefa60b443863060cdad
parent0947f5c26804bc74b8f1242d856c1f703544c3de (diff)
parenta8b244e5b83e4e773411c134c7a8df2a2392fb44 (diff)
downloadandroid_packages_apps_Trebuchet-066bcc05fb97843dab518e0bc70ae766ed3edf28.zip
android_packages_apps_Trebuchet-066bcc05fb97843dab518e0bc70ae766ed3edf28.tar.gz
android_packages_apps_Trebuchet-066bcc05fb97843dab518e0bc70ae766ed3edf28.tar.bz2
Merge "Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app" into ub-launcher3-burnaby
-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";