diff options
author | Jason Monk <jmonk@google.com> | 2015-05-13 21:06:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-13 21:06:30 +0000 |
commit | d7fd045014b746a9822a66390288f44b63e4dc2f (patch) | |
tree | 41d06681869ae4022da63fd3fd0116a73cb825ef /packages/SettingsLib | |
parent | c968e219372e140e2ae34f9b1e91597ccb719381 (diff) | |
parent | 0e6cac26585b04dc9a357b03cab09d93404819f1 (diff) | |
download | frameworks_base-d7fd045014b746a9822a66390288f44b63e4dc2f.zip frameworks_base-d7fd045014b746a9822a66390288f44b63e4dc2f.tar.gz frameworks_base-d7fd045014b746a9822a66390288f44b63e4dc2f.tar.bz2 |
Merge "Add default icon for permissions" into mnc-dev
Diffstat (limited to 'packages/SettingsLib')
-rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/applications/PermissionsInfo.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/PermissionsInfo.java b/packages/SettingsLib/src/com/android/settingslib/applications/PermissionsInfo.java index 2606af2..8b38a5f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/applications/PermissionsInfo.java +++ b/packages/SettingsLib/src/com/android/settingslib/applications/PermissionsInfo.java @@ -22,7 +22,6 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PermissionGroupInfo; import android.content.pm.PermissionInfo; import android.graphics.drawable.Drawable; -import android.graphics.drawable.ShapeDrawable; import android.os.AsyncTask; import android.os.Build; import android.os.UserHandle; @@ -80,7 +79,8 @@ public class PermissionsInfo { if (info.protectionLevel == PermissionInfo.PROTECTION_DANGEROUS) { group = new PermissionGroup(); // TODO: Add default permission icon. - group.icon = info.icon != 0 ? info.loadIcon(mPm) : new ShapeDrawable(); + group.icon = info.icon != 0 ? info.loadIcon(mPm) : mContext.getDrawable( + com.android.internal.R.drawable.ic_perm_device_info); group.name = info.name; group.packageName = info.packageName; group.label = info.loadLabel(mPm).toString(); @@ -104,7 +104,8 @@ public class PermissionsInfo { for (PermissionGroupInfo groupInfo : groups) { PermissionGroup group = new PermissionGroup(); // TODO: Add default permission icon. - group.icon = groupInfo.icon != 0 ? groupInfo.loadIcon(mPm) : new ShapeDrawable(); + group.icon = groupInfo.icon != 0 ? groupInfo.loadIcon(mPm) : mContext.getDrawable( + com.android.internal.R.drawable.ic_perm_device_info); group.name = groupInfo.name; group.packageName = groupInfo.packageName; group.label = groupInfo.loadLabel(mPm).toString(); |