public static class PermissionRequestManager.PermissionRequest
extends java.lang.Object
Constructor and Description |
---|
PermissionRequest(java.lang.String id,
int iconRes,
int titleRes,
int textRes)
Default constructor to initialize a PermissinoRequest
|
Modifier and Type | Method and Description |
---|---|
int |
getIcon()
Icon of the permission used when displaying UI in the
PermissionStepLayout |
java.lang.String |
getId()
Returns the id of the permission.
|
int |
getText()
The explanation used when displaying UI in the
PermissionStepLayout |
int |
getTitle()
Title of the permission used when displaying UI in the
PermissionStepLayout |
boolean |
isBlockingPermission()
Returns true if this permissino is blocking
|
boolean |
isSystemPermission()
Returns true if PermissionRequest should be handled by the system grant flow
|
void |
setIsBlockingPermission(boolean blocking)
This paramter is used in the
PermissionStepLayout that makes a permission
optional or not. |
void |
setIsSystemPermission(boolean system)
Sets to true if the permission should be handled by the system grant flow
|
public PermissionRequest(java.lang.String id, @DrawableRes int iconRes, @StringRes int titleRes, @StringRes int textRes)
id
- the id of the requesticonRes
- the icon used to display a UI in the PermissionStepLayout
titleRes
- the title used to display a UI in the PermissionStepLayout
textRes
- the explanation used to display a UI in the PermissionStepLayout
public java.lang.String getId()
Manifest.permission
@DrawableRes public int getIcon()
PermissionStepLayout
@StringRes public int getTitle()
PermissionStepLayout
@StringRes public int getText()
PermissionStepLayout
public void setIsBlockingPermission(boolean blocking)
PermissionStepLayout
that makes a permission
optional or not. The user will not be allowed past the step if there are still some
permissions havent been granted which this property set to trueblocking
- true if the user needs to take action on this permissionpublic boolean isBlockingPermission()
PermissionStepLayout
public void setIsSystemPermission(boolean system)
system
- true if this is a system permissionpublic boolean isSystemPermission()