question: private void doPermissionWorkBeforeAndroidM ( @ NonNull Activity activity , @ NonNull String [ ] permissions , @ Nullable PermissionsResultAction action ) { for ( String perm : permissions ) { if ( action != null ) { if ( ! mPermissions . contains ( perm ) ) { action . onResult ( perm , Permissions . NOT_FOUND ) ; } else if ( ActivityCompat . checkSelfPermission ( activity , perm ) != PackageManager . PERMISSION_GRANTED ) { action . onResult ( perm , Permissions . DENIED ) ; } else { action . onResult ( perm , Permissions . GRANTED ) ; } } } }
target:  When request permissions on devices before Android M (Android 6.0, API Level 23) Do the granted or denied work directly according to the permission status