• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.security.apc;
18 
19 import android.security.apc.ResponseCode;
20 
21 /**
22  * This callback interface must be implemented by the client to receive the result of the user
23  * confirmation.
24  * @hide
25  */
26 interface IConfirmationCallback {
27     /**
28      * This callback gets called by the implementing service when a pending confirmation prompt
29      * gets finalized.
30      *
31      * @param result
32      *  - ResponseCode.OK On success. In this case dataConfirmed must be non null.
33      *  - ResponseCode.CANCELLED If the user cancelled the prompt. In this case dataConfirmed must
34      *           be null.
35      *  - ResponseCode.ABORTED If the client called IProtectedConfirmation.cancelPrompt() or if the
36      *           prompt was cancelled by the system due to an asynchronous event. In this case
37      *           dataConfirmed must be null.
38      *
39      * @param dataConfirmed This is the message that was confirmed and for which a confirmation
40      *           token is now available in implementing service. A subsequent attempt to sign this
41      *           message with a confirmation bound key will succeed. The message is a CBOR map
42      *           including the prompt text and the extra data.
43      */
onCompleted(in ResponseCode result, in @nullable byte[] dataConfirmed)44     oneway void onCompleted(in ResponseCode result, in @nullable byte[] dataConfirmed);
45 }
46