Skip to content

Commit b8f51c9

Browse files
author
liuhuo.xd
committed
.filter(pi -> (pi.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE) == PermissionInfo.PROTECTION_DANGEROUS)
1 parent 1b6157c commit b8f51c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sample/src/main/java/com/xdandroid/sample/misc/RevokeActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
4040
try { return pm.getPermissionInfo(p, 0); } catch (Exception e) { return null; }
4141
})
4242
.filter(Objects::nonNull)
43-
.filter(pi -> (pi.protectionLevel & PermissionInfo.PROTECTION_DANGEROUS) != 0)
43+
.filter(pi -> (pi.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE) == PermissionInfo.PROTECTION_DANGEROUS)
4444
.map(pi -> pi.name)
4545
.filter(pn -> pn.startsWith("android"))
4646
.filter(pn -> !"android.permission.READ_EXTERNAL_STORAGE".equals(pn))

0 commit comments

Comments
 (0)