diff --git a/tedpermission/src/main/java/com/gun0912/tedpermission/TedPermissionActivity.java b/tedpermission/src/main/java/com/gun0912/tedpermission/TedPermissionActivity.java index 9940dcf..3d0597f 100644 --- a/tedpermission/src/main/java/com/gun0912/tedpermission/TedPermissionActivity.java +++ b/tedpermission/src/main/java/com/gun0912/tedpermission/TedPermissionActivity.java @@ -129,19 +129,20 @@ private void checkPermissions(boolean fromOnActivityResult) { ArrayList needPermissions = new ArrayList<>(); + boolean showRationale = false; for (String permission : permissions) { - if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) { needPermissions.add(permission); + showRationale=true; } } - boolean showRationale = false; +/* for(String permission:needPermissions){ @@ -151,6 +152,7 @@ private void checkPermissions(boolean fromOnActivityResult) { } +*/ if (needPermissions.isEmpty()) {