blob: 62222a398aff6ac401a8ae674f1ac23bad272e7d [file] [log] [blame]
Kevin Chyna24e9fd2018-08-27 12:39:17 -07001/*
2 * Copyright (C) 2018 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 */
16package android.hardware.biometrics;
17
Kevin Chyna24e9fd2018-08-27 12:39:17 -070018/**
Kevin Chyne92cdae2018-11-21 16:35:04 -080019 * Communication channel from
20 * 1) BiometricDialogImpl (SysUI) back to BiometricService
21 * 2) <Biometric>Service back to BiometricService
22 * 3) BiometricService back to BiometricPrompt
23 * BiometricPrompt sends a receiver to BiometricService, BiometricService contains another
24 * "trampoline" receiver which intercepts messages from <Biometric>Service and does some
25 * logic before forwarding results as necessary to BiometricPrompt.
Kevin Chyna24e9fd2018-08-27 12:39:17 -070026 * @hide
27 */
Kevin Chyn352adfe2018-09-20 22:28:50 -070028oneway interface IBiometricServiceReceiver {
Kevin Chyne92cdae2018-11-21 16:35:04 -080029 // Notify BiometricPrompt that authentication was successful
30 void onAuthenticationSucceeded();
31 // Notify BiometricService that authentication was successful. If user confirmation is required,
32 // the auth token must be submitted into KeyStore.
33 void onAuthenticationSucceededInternal(boolean requireConfirmation, in byte[] token);
34 // Noties that authentication failed.
35 void onAuthenticationFailed();
Kevin Chyn87f257a2018-11-27 16:26:07 -080036 // Notify BiometricPrompt that an error has occurred.
Kevin Chyne92cdae2018-11-21 16:35:04 -080037 void onError(int error, String message);
Kevin Chyn87f257a2018-11-27 16:26:07 -080038 // Notify BiometricService than an error has occured. Forward to the correct receiver depending
39 // on the cookie.
40 void onErrorInternal(int error, String message, int cookie);
Kevin Chyne92cdae2018-11-21 16:35:04 -080041 // Notifies that a biometric has been acquired.
42 void onAcquired(int acquiredInfo, String message);
43 // Notifies that the SystemUI dialog has been dismissed.
44 void onDialogDismissed(int reason);
Kevin Chyna24e9fd2018-08-27 12:39:17 -070045}