From 98b44c79758924242ac290ec3a8bbef1d6ee0510 Mon Sep 17 00:00:00 2001 From: gun0912 Date: Fri, 27 May 2016 14:25:15 +0900 Subject: [PATCH] - Fix rational message trigger --- .../com/gun0912/tedpermission/TedPermissionActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()) {