1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.security.apc;
import android.security.apc.IConfirmationCallback;
/** @hide */
interface IProtectedConfirmation {
/**
* When set in the uiOptionFlags parameter of presentPrompt, indicates to the implementation
* that it shall use inverted color mode.
*/
const int FLAG_UI_OPTION_INVERTED = 1;
/**
* When set in the uiOptionFlags parameter of presentPrompt, indicates to the implementation
* that it shall use magnified font mode.
*/
const int FLAG_UI_OPTION_MAGNIFIED = 2;
/**
* Present the confirmation prompt. The caller must implement IConfirmationCallback and pass
* it to this function as listener.
* @deprecated Android Protected Confirmation had a low adoption rate among Android device
* makers and developers alike. Given the lack of devices supporting the
* feature, it is deprecated. Developers can use auth-bound Keystore keys
* as a partial replacement.
*
* @param listener Must implement IConfirmationCallback. Doubles as session identifier when
* passed to cancelPrompt.
* @param promptText The text that will be displayed to the user using the protected
* confirmation UI.
* @param extraData Extra data, e.g., a nonce, that will be included in the to-be-signed
* message.
* @param locale The locale string is used to select the language for the instructions
* displayed by the confirmation prompt.
* @param uiOptionFlags Bitwise combination of FLAG_UI_OPTION_* see above.
*
* Service specific error codes:
* - ResponseCode.OPERATION_PENDING If another prompt is already pending.
* - ResponseCode.SYSTEM_ERROR An unexpected error occurred.
*/
void presentPrompt(in IConfirmationCallback listener, in String promptText,
in byte[] extraData, in String locale, in int uiOptionFlags);
/**
* Cancel an ongoing prompt.
* @deprecated Android Protected Confirmation had a low adoption rate among Android device
* makers and developers alike. Given the lack of devices supporting the
* feature, it is deprecated. Developers can use auth-bound Keystore keys as
* a partial replacement.
*
*
* @param listener Must implement IConfirmationCallback, although in this context this binder
* token is only used to identify the session that is to be cancelled.
*
* Service specific error code:
* - ResponseCode.IGNORED If the listener does not represent an ongoing prompt session.
*/
void cancelPrompt(IConfirmationCallback listener);
/**
* Returns true if the device supports Android Protected Confirmation.
* @deprecated Android Protected Confirmation had a low adoption rate among Android device
* makers and developers alike. Given the lack of devices supporting the
* feature, it is deprecated. Developers can use auth-bound Keystore keys
* as a partial replacement.
*/
boolean isSupported();
}
|