Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e6cac26 authored by Jason Monk's avatar Jason Monk
Browse files

Add default icon for permissions

Bug: 21119477
Change-Id: Ie982a1b42d2195ab79c33cf87756efb3bd9eab29
parent cf304fb3
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2015 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:height="24.0dp"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M26.0,14.0l-4.0,0.0l0.0,4.0l4.0,0.0l0.0,-4.0zm0.0,8.0l-4.0,0.0l0.0,12.0l4.0,0.0L26.0,22.0zm8.0,-19.98L14.0,2.0c-2.21,0.0 -4.0,1.79 -4.0,4.0l0.0,36.0c0.0,2.21 1.79,4.0 4.0,4.0l20.0,0.0c2.21,0.0 4.0,-1.79 4.0,-4.0L38.0,6.0c0.0,-2.21 -1.79,-3.98 -4.0,-3.98zM34.0,38.0L14.0,38.0L14.0,10.0l20.0,0.0l0.0,28.0z"/>
</vector>
+1 −0
Original line number Diff line number Diff line
@@ -2262,4 +2262,5 @@
  <java-symbol type="color" name="chooser_service_row_background_color" />
  <java-symbol type="id" name="target_badge" />
  <java-symbol type="bool" name="config_supportDoubleTapWake" />
  <java-symbol type="drawable" name="ic_perm_device_info" />
</resources>
+4 −3
Original line number Diff line number Diff line
@@ -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.label = info.loadLabel(mPm).toString();
                    mGroups.add(group);
@@ -103,7 +103,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.label = groupInfo.loadLabel(mPm).toString();
                synchronized (mGroups) {