Skip to content

Commit b9cbc0f

Browse files
authored
Merge pull request #249 from shiraji/use_PermissionChecker
Use PermissionChecker's checkSelfPermission
2 parents 17a0fdf + 5a3d190 commit b9cbc0f

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)