SmsCodeAutofillClient.PermissionState

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = [PermissionState.NONE, PermissionState.GRANTED, PermissionState.DENIED])
@Target(value = [ElementType.TYPE_PARAMETER, ElementType.TYPE_USE])
public annotation SmsCodeAutofillClient.PermissionState


Permission states for the current user-designated autofill service. The initial state is NONE upon the first time using the SMS Code Autofill API. This permission can be granted or denied through a consent dialog requested by the current autofill service, or an explicit change by users within the SMS verification codes settings.

Summary

Constants

static final int
DENIED = 2

Indicates that the current autofill service has been denied permission by the user.

static final int

Indicates that the current autofill service has been granted permission by the user.

static final int
NONE = 0

Indicates that the current autofill service has not been granted or denied permission by the user.

Constants

DENIED

public static final int DENIED = 2

Indicates that the current autofill service has been denied permission by the user. Calling startSmsCodeRetriever will fail with USER_PERMISSION_REQUIRED. It can only be resolved by the user explicitly turning on the permission in settings.

GRANTED

public static final int GRANTED = 1

Indicates that the current autofill service has been granted permission by the user. The user consent is not required for calling startSmsCodeRetriever in this state.

NONE

public static final int NONE = 0

Indicates that the current autofill service has not been granted or denied permission by the user. Calling startSmsCodeRetriever will fail with RESOLUTION_REQUIRED. The caller can use startResolutionForResult to show a consent dialog for requesting permission from the user.