opermission/src/main/java/co/omkar/utility/opermission/RequestPermission.java
private static boolean anyValueDenied(Object[] values, HashMap<Permission, Result> resultMap) {
        if (values instanceof Permission[]) {
            Set<Permission> valueSet = new LinkedHashSet<>(Arrays.asList((Permission[]) values));
            if (resultMap.keySet().containsAll(valueSet)) {
                for (Object value : values) {
                    if (Result.DENIED == resultMap.get((Permission) value)) {
                        mLog.i(TAG, "denied - " + value.toString());
                        return true;
                    }
                }
            }
        } else if (values instanceof String[]) {
            Set<String> valueSet = new HashSet<>(Arrays.asList((String[]) values));
            Set<String> permissionSet = new HashSet<>();
            for (Permission perm : resultMap.keySet()) {
                permissionSet.add(perm.toString());
            }
            if (permissionSet.containsAll(valueSet)) {
                for (Object value : values) {
                    if (Result.DENIED == resultMap.get(Permission.get((String) value))) {
                        mLog.i(TAG, "denied - " + value);
                        return true;
                    }
                }
            }
        }
        return false;
    }
private static boolean anyValueDenied(Object[] values, HashMap<Permission, Result> resultMap) {
        if (values instanceof Permission[]) {
            Set<Permission> valueSet = new LinkedHashSet<>(Arrays.asList((Permission[]) values));
            if (resultMap.keySet().containsAll(valueSet)) {
                for (Object value : values) {
                    if (Result.DENIED == resultMap.get((Permission) value)) {
                        mLog.i(TAG, "denied - " + value.toString());
                        return true;
                    }
                }
            }
        } else if (values instanceof String[]) {
            Set<String> valueSet = new HashSet<>(Arrays.asList((String[]) values));
            Set<String> permissionSet = new HashSet<>();
            for (Permission perm : resultMap.keySet()) {
                permissionSet.add(perm.toString());
            }
            if (permissionSet.containsAll(valueSet)) {
                for (Object value : values) {
                    if (Result.DENIED == resultMap.get(Permission.get((String) value))) {
                        mLog.i(TAG, "denied - " + value);
                        return true;
                    }
                }
            }
        }
        return false;
    }
private static boolean anyValueDenied ( Object [ ] values , HashMap < Permission , Result > resultMap ) { if ( values instanceof Permission [ ] ) { Set < Permission > valueSet = new LinkedHashSet <> ( Arrays . asList ( ( Permission [ ] ) values ) ) ; if ( resultMap . keySet ( ) . containsAll ( valueSet ) ) { for ( Object value : values ) { if ( Result . DENIED == resultMap . get ( ( Permission ) value ) ) { mLog . i ( TAG , "denied - " + value . toString ( ) ) ; return true ; } } } } else if ( values instanceof String [ ] ) { Set < String > valueSet = new HashSet <> ( Arrays . asList ( ( String [ ] ) values ) ) ; Set < String > permissionSet = new HashSet <> ( ) ; for ( Permission perm : resultMap . keySet ( ) ) { permissionSet . add ( perm . toString ( ) ) ; } if ( permissionSet . containsAll ( valueSet ) ) { for ( Object value : values ) { if ( Result . DENIED == resultMap . get ( Permission . get ( ( String ) value ) ) ) { mLog . i ( TAG , "denied - " + value ) ; return true ; } } } } return false ; }
Check if annotated result permissions contains all values from annotated array.
Then it also check if any permission in annotated method value array is denied.

@param values    ({@link Permission} or {@link String}) array.
@param resultMap Permission and respective result map.
@return false if first statement is not satisfied else true if both are satisfied.
Check if annotated result permissions contains all values from annotated array . Then it also check if any permission in annotated method value array is denied .