Skip to content

Commit 5a3d190

Browse files
committed
Use PermissionChecker's checkSelfPermission
1 parent 17a0fdf commit 5a3d190

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/android/permissions/dispatcher/PermissionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private static boolean hasSelfPermission(Context context, String permission) {
110110
private static boolean hasSelfPermissionForXiaomi(Context context, String permission) {
111111
AppOpsManager appOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
112112
int checkOp = appOpsManager.checkOp(AppOpsManager.permissionToOp(permission), Process.myUid(), context.getPackageName());
113-
return checkOp == AppOpsManager.MODE_ALLOWED && ActivityCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED;
113+
return checkOp == AppOpsManager.MODE_ALLOWED && checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED;
114114
}
115115

116116
/**

0 commit comments

Comments
 (0)