Permission

With the static Permissions class the PermissionStatus can be queried from a PermissionType. This can be either granted (allowed), prompt (the user will be asked next time) or denied (not allowed).

Example:

// Printing the state of all kinds of permissions
Stream.of(PermissionType.values()).forEach(permission -> {
  Permissions.getPermissionStatus(permission, status -> {
    System.out.println(permission + ": " + status);
  });
});