code: public static boolean isPermissionGranted(@NonNull final Context context,
                                                @NonNull final String permission) {
          Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
          Condition.INSTANCE.ensureNotNull(permission, "The permission may not be null");
          Condition.INSTANCE.ensureNotEmpty(permission, "The permission may not be empty");
          return Build.VERSION.SDK_INT < Build.VERSION_CODES.M ||
                  ContextCompat.checkSelfPermission(context, permission) ==
                          PackageManager.PERMISSION_GRANTED;
      }
docs: Returns, whether a specific permission is granted, or not.
  
  @param context
  The context, which should be used, as an instance of the class {@link Context}. The
  context may not be null
  @param permission
  The permission, which should be checked, as a {@link String}, e.g.
  <code>android.Manifest.permission.CALL_PHONE</code>. The permission may neither be
  null, nor empty
  @return True, if the given permission is granted, false otherwise