public static boolean areAllPermissionsGranted ( @ NonNull final Context context , @ NonNull final String ... permissions ) { Condition . INSTANCE . ensureNotNull ( context , "The context may not be null" ) ; Condition . INSTANCE . ensureNotNull ( permissions , "The array may not be null" ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . M ) { for ( String permission : permissions ) { if ( ! isPermissionGranted ( context , permission ) ) { return false ; } } } return true ; }
Returns whether all permissions which are contained by a specific array are granted or not .