Guard against apps with no permissions
Bug: 27355802 Change-Id: Iee8d9898af0e5910319cb47218ceee8da1352554
This commit is contained in:
@@ -914,6 +914,9 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasPermission(String permission) {
|
private boolean hasPermission(String permission) {
|
||||||
|
if (mPackageInfo.requestedPermissions == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
for (int i = 0; i < mPackageInfo.requestedPermissions.length; i++) {
|
for (int i = 0; i < mPackageInfo.requestedPermissions.length; i++) {
|
||||||
if (mPackageInfo.requestedPermissions[i].equals(permission)) {
|
if (mPackageInfo.requestedPermissions[i].equals(permission)) {
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user