Package: android.hardware.confirmationui@1.0

types

Properties

UIOption

enum UIOption: uint32_t

UI modification options.

Details
Members
AccessibilityInverted = 0
Accessibility:Requests color inverted style.
AccessibilityMagnified = 1
Accessibility:Requests magnified style.

ResponseCode

enum ResponseCode: uint32_t

Codes returned by ConfirmationUI API calls.

Details
Members
OK = 0
API call succeeded or the user gave approval(result callback).
Canceled = 1
The user canceled the TUI(result callback).
Aborted = 2
IConfirmationUI::abort() was called .(result callback).
OperationPending = 3
Cannot start another prompt.
Ignored = 4
IConfirmationUI::deliverSecureInputEvent call was ingored.
SystemError = 5
An unexpected system error occured.
Unimplemented = 6
Returned by an unimplemented API call.
Unexpected = 7
This is returned when an error is diagnosed that should have been caught by earlier input sanitization.Should never be seen in production.
UIError = 0x10000
General UI error.
UIErrorMissingGlyph
UIErrorMessageTooLong
The implementation must return this error code on promptUserConfirmation if the resulting formatted message does not fit into MessageSize::MAX bytes.It is advised that the implementation formats the message upon receiving this API call to be able to diagnose this syndrome.
UIErrorMalformedUTF8Encoding

MessageSize

enum MessageSize: uint32_t

This defines the maximum message size.This indirectly limits the size of the prompt text and the extra data that can be passed to the confirmation UI.The prompt text and extra data must fit in to this size including CBOR header information.

Details
Members
MAX = 0x1800

TestKeyBits

enum TestKeyBits: uint8_t

The test key is 32byte word with all bytes set to TestKeyBits::BYTE.

Details
Members
BYTE = 0xA5

TestModeCommands

enum TestModeCommands: uint64_t

Test mode commands.

IConfirmationUI::deliverSecureInputEvent can be used to test certain code paths.To that end, the caller passes an auth token that has an HMAC keyed with the test key(see TestKeyBits in types.hal). Implementations first check the HMAC against test key.If the test key produces a matching HMAC, the implementation evaluates the challenge field of the auth token against the values defined in TestModeCommand.If the command indicates that a confirmation token is to be generated the test key MUST be used to generate this confirmation token.

See command code for individual test command descriptions.

Details
Members
OK_EVENT = 0
Simulates the user pressing the OK button on the UI.If no operation is pending ResponseCode::Ignored must be returned.A pending operation is finalized successfully see IConfirmationResultCallback::result, however, the test key(see TestKeyBits)MUST be used to generate the confirmation token.
CANCEL_EVENT = 1
Simulates the user pressing the CANCEL button on the UI.If no operation is pending Result::Ignored must be returned.A pending operation is finalized as specified in IConfirmationResultCallback.hal.