summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-05-13 21:06:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-13 21:06:32 +0000
commit30e17719bec901212e4b6c3ad3675fd989214f41 (patch)
tree9864ffd4cfb3b7fadaed29972a633d956e46c7dd /src
parenta9e632bec5a6bb4e053468e07360ceab56add490 (diff)
parentee3326a1516659ea4d4120621b0f30755f58ea48 (diff)
downloadandroid_packages_apps_PackageInstaller-30e17719bec901212e4b6c3ad3675fd989214f41.tar.gz
android_packages_apps_PackageInstaller-30e17719bec901212e4b6c3ad3675fd989214f41.tar.bz2
android_packages_apps_PackageInstaller-30e17719bec901212e4b6c3ad3675fd989214f41.zip
Merge "Add default permission icon" into mnc-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/packageinstaller/permission/model/PermissionApps.java6
-rw-r--r--src/com/android/packageinstaller/permission/model/PermissionGroup.java3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/permission/model/PermissionApps.java b/src/com/android/packageinstaller/permission/model/PermissionApps.java
index 70edbbcc..81e5af51 100644
--- a/src/com/android/packageinstaller/permission/model/PermissionApps.java
+++ b/src/com/android/packageinstaller/permission/model/PermissionApps.java
@@ -96,7 +96,11 @@ public class PermissionApps {
}
}
mLabel = info.loadLabel(mPm);
- mIcon = info.loadUnbadgedIcon(mPm);
+ if (info.icon != 0) {
+ mIcon = info.loadUnbadgedIcon(mPm);
+ } else {
+ mIcon = mContext.getDrawable(com.android.internal.R.drawable.ic_perm_device_info);
+ }
LightingColorFilter filter = new LightingColorFilter(0, 0xffffffff);
mIcon.setColorFilter(filter);
}
diff --git a/src/com/android/packageinstaller/permission/model/PermissionGroup.java b/src/com/android/packageinstaller/permission/model/PermissionGroup.java
index 3a197184..1f20e442 100644
--- a/src/com/android/packageinstaller/permission/model/PermissionGroup.java
+++ b/src/com/android/packageinstaller/permission/model/PermissionGroup.java
@@ -169,7 +169,8 @@ public final class PermissionGroup implements Comparable<PermissionGroup> {
mName = name;
mLabel = label;
mIconPkg = iconPkg;
- mIconResId = iconResId;
+ mIconResId = iconResId != 0 ? iconResId
+ : com.android.internal.R.drawable.ic_perm_device_info;
}
public boolean isAppOpPermission() {