Merge "AppSecurityPermissions: Add isGranted to isDisplayablePermission" into jb-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4b2548815d
@@ -515,10 +515,12 @@ public class AppSecurityPermissions {
|
||||
((pInfo.protectionLevel&PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0);
|
||||
final boolean wasGranted =
|
||||
((existingReqFlags&PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0);
|
||||
final boolean isGranted =
|
||||
((newReqFlags&PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0);
|
||||
|
||||
// Dangerous and normal permissions are always shown to the user if the permission
|
||||
// is required, or it was previously granted
|
||||
if ((isNormal || isDangerous) && (isRequired || wasGranted)) {
|
||||
if ((isNormal || isDangerous) && (isRequired || wasGranted || isGranted)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user