Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8e3bbfb authored by avinashhedage's avatar avinashhedage
Browse files

Updated the comments where the return codes are used in other types.

Bug: 205760172
Test: VtsHalConfirmationUITarget
Change-Id: I9c30329361e27748c542e42bf932e01acc2f5a66
parent 9113258f
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -26,16 +26,16 @@ import android.hardware.confirmationui.IConfirmationUI;
interface IConfirmationResultCallback {
    /**
     * This callback is called by the confirmation provider when it stops prompting the user.
     * Iff the user has confirmed the prompted text, error is ErrorCode::OK and the
     * Iff the user has confirmed the prompted text, error is IConfirmationUI::OK and the
     * parameters formattedMessage and confirmationToken hold the values needed to request
     * a signature from keymaster.
     * In all other cases formattedMessage and confirmationToken must be of length 0.
     *
     * @param error - OK: IFF the user has confirmed the prompt.
     *              - CANCELED: If the user has pressed the cancel button.
     *              - ABORTED: If IConfirmationUI::abort() was called.
     *              - SYSTEM_ERROR: If an unexpected System error occurred that prevented the TUI
     *                             from being shut down gracefully.
     * @param error - IConfirmationUI::OK: IFF the user has confirmed the prompt.
     *              - IConfirmationUI::CANCELED: If the user has pressed the cancel button.
     *              - IConfirmationUI::ABORTED: If IConfirmationUI::abort() was called.
     *              - IConfirmationUI::SYSTEM_ERROR: If an unexpected System error occurred that
     * prevented the TUI from being shut down gracefully.
     *
     * @param formattedMessage holds the prompt text and extra data.
     *                         The message is CBOR (RFC 7049) encoded and has the following format:
@@ -59,7 +59,7 @@ interface IConfirmationResultCallback {
     *                          the "", concatenated with the formatted message as returned in the
     *                          formattedMessage argument. The HMAC is keyed with a 256-bit secret
     *                          which is shared with Keymaster. In test mode the test key MUST be
     *                          used (see types.hal TestModeCommands and
     *                          used (see TestModeCommands.aidl and
     * IConfirmationUI::TEST_KEY_BYTE).
     */
    void result(in int error, in byte[] formattedMessage, in byte[] confirmationToken);
+2 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ interface IConfirmationUI {
    /**
     * Aborts a pending user prompt. This allows the framework to gracefully end a TUI dialog.
     * If a TUI operation was pending the corresponding call back is informed with
     * ErrorCode::Aborted.
     * IConfirmationUI::ABORTED.
     */
    void abort();

@@ -139,7 +139,7 @@ interface IConfirmationUI {
     *                      is an IETF BCP 47 tag.
     *
     * @param uiOptions A set of uiOptions manipulating how the confirmation prompt is displayed.
     *                  Refer to UIOption in types.hal for possible options.
     *                  Refer to UIOption in UIOptions.aidl for possible options.
     */
    void promptUserConfirmation(in IConfirmationResultCallback resultCB, in byte[] promptText,
            in byte[] extraData, in @utf8InCpp String locale, in UIOption[] uiOptions);
+3 −3
Original line number Diff line number Diff line
@@ -34,15 +34,15 @@ package android.hardware.confirmationui;
enum TestModeCommands {
    /**
     * 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
     * IConfirmationUI::IGNORED must be returned. A pending operation is finalized successfully
     * see IConfirmationResultCallback::result, however, the test key
     * (see IConfirmationUI::TEST_KEY_BYTE) MUST be used to generate the confirmation token.
     */
    OK_EVENT = 0,
    /**
     * 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.
     * IConfirmationUI::IGNORED must be returned. A pending operation is finalized as specified in
     * IConfirmationResultCallback.aidl.
     */
    CANCEL_EVENT = 1,
}