@@ -403,6 +403,37 @@ private static boolean shouldShowRationale(@NonNull Object object, @NonNull Stri
403403 return shouldShowRationale ;
404404 }
405405
406+ /**
407+ * @param activity Activity
408+ * @param perms Array of permissions
409+ * @return true if the user has previously denied any of the {@code perms} and we should show a
410+ * rationale, false otherwise.
411+ */
412+ public static boolean somePermissionDenied (@ NonNull Activity activity , @ NonNull String [] perms ) {
413+ return shouldShowRationale (activity , perms );
414+ }
415+
416+ /**
417+ * @param fragment Fragment
418+ * @param perms Array of permissions
419+ * @return true if the user has previously denied any of the {@code perms} and we should show a
420+ * rationale, false otherwise.
421+ */
422+ public static boolean somePermissionDenied (@ NonNull Fragment fragment , @ NonNull String [] perms ) {
423+ return shouldShowRationale (fragment , perms );
424+ }
425+
426+ /**
427+ * @param fragment Fragment
428+ * @param perms Array of permissions
429+ * @return true if the user has previously denied any of the {@code perms} and we should show a
430+ * rationale, false otherwise.
431+ */
432+ @ RequiresApi (api = Build .VERSION_CODES .M )
433+ public static boolean somePermissionDenied (@ NonNull android .app .Fragment fragment , @ NonNull String [] perms ) {
434+ return shouldShowRationale (fragment , perms );
435+ }
436+
406437 private static boolean shouldShowRequestPermissionRationale (@ NonNull Object object ,
407438 @ NonNull String perm ) {
408439 if (object instanceof Activity ) {
0 commit comments