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

Guard against apps with no permissions

Bug: 27355802
Change-Id: Iee8d9898af0e5910319cb47218ceee8da1352554
parent 97fdbaf4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment