summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Kennedy <toddke@google.com>2015-11-24 19:52:03 (GMT)
committerTodd Kennedy <toddke@google.com>2015-12-17 21:16:33 (GMT)
commit58045ad49af12b202b08a4f054a54e2774ca48f1 (patch)
treea2da85f838535d646a0ee062f3a0d311dee99d18
parent587374a996e14a7d0bd278e7c6b0a755e1d7112c (diff)
downloadandroid_packages_apps_PackageInstaller-58045ad49af12b202b08a4f054a54e2774ca48f1.zip
android_packages_apps_PackageInstaller-58045ad49af12b202b08a4f054a54e2774ca48f1.tar.gz
android_packages_apps_PackageInstaller-58045ad49af12b202b08a4f054a54e2774ca48f1.tar.bz2
Always have an icon
The permission icon can be an external icon and thus might not exist. So, ensure we always have an icon for the permissions UI. Bug: 25602523 Change-Id: Ibdb1f296ff8c5f3664fe8056c8637844b580cce9
-rw-r--r--src/com/android/packageinstaller/permission/model/PermissionGroups.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/permission/model/PermissionGroups.java b/src/com/android/packageinstaller/permission/model/PermissionGroups.java
index 59eba85..c496e89 100644
--- a/src/com/android/packageinstaller/permission/model/PermissionGroups.java
+++ b/src/com/android/packageinstaller/permission/model/PermissionGroups.java
@@ -212,11 +212,12 @@ public final class PermissionGroups implements LoaderCallbacks<List<PermissionGr
}
private Drawable loadItemInfoIcon(PackageItemInfo itemInfo) {
- final Drawable icon;
+ Drawable icon = null;
if (itemInfo.icon > 0) {
icon = Utils.loadDrawable(getContext().getPackageManager(),
itemInfo.packageName, itemInfo.icon);
- } else {
+ }
+ if (icon == null) {
icon = getContext().getDrawable(R.drawable.ic_perm_device_info);
}
return icon;