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

Commit 9f0dbcc5 authored by Jason Monk's avatar Jason Monk Committed by The Android Automerger
Browse files

Guard against apps with no permissions

Bug: 27355802
Change-Id: Iee8d9898af0e5910319cb47218ceee8da1352554
parent 97fdbaf4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -914,6 +914,9 @@ public class InstalledAppDetails extends AppInfoBase
    }

    private boolean hasPermission(String permission) {
        if (mPackageInfo.requestedPermissions == null) {
            return false;
        }
        for (int i = 0; i < mPackageInfo.requestedPermissions.length; i++) {
            if (mPackageInfo.requestedPermissions[i].equals(permission)) {
                return true;