am 4b254881: Merge "AppSecurityPermissions: Add isGranted to isDisplayablePermission" into jb-mr2-dev
* commit '4b2548815df45b3aa6a8144abeeaea504ee6f7b1': AppSecurityPermissions: Add isGranted to isDisplayablePermission
This commit is contained in:
@@ -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