public final class PermissionUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PermissionUtils.PermissionType |
Modifier and Type | Method and Description |
---|---|
static Optional<String> |
getPermissionRoot(String permission)
Obtains the 'root' of the permission which is defined as anything that comes after one of the
PermissionUtils.PermissionType.prefixes() . |
public static Optional<String> getPermissionRoot(@NonNull String permission)
PermissionUtils.PermissionType.prefixes()
. Example: given ALL_PRODUCT this will return PRODUCT and
given SOME_PERMISSION this will return an empty optionalpermission
- a permissionPermissionUtils.PermissionType.prefixes()
PermissionUtils.PermissionType.prefixes()
Copyright © 2021. All rights reserved.