Kevin Chyn | a24e9fd | 2018-08-27 12:39:17 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package android.hardware.biometrics; |
| 17 | |
Kevin Chyn | a24e9fd | 2018-08-27 12:39:17 -0700 | [diff] [blame] | 18 | /** |
Kevin Chyn | e92cdae | 2018-11-21 16:35:04 -0800 | [diff] [blame] | 19 | * 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 Chyn | a24e9fd | 2018-08-27 12:39:17 -0700 | [diff] [blame] | 26 | * @hide |
| 27 | */ |
Kevin Chyn | 352adfe | 2018-09-20 22:28:50 -0700 | [diff] [blame] | 28 | oneway interface IBiometricServiceReceiver { |
Kevin Chyn | e92cdae | 2018-11-21 16:35:04 -0800 | [diff] [blame] | 29 | // 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 Chyn | 87f257a | 2018-11-27 16:26:07 -0800 | [diff] [blame^] | 36 | // Notify BiometricPrompt that an error has occurred. |
Kevin Chyn | e92cdae | 2018-11-21 16:35:04 -0800 | [diff] [blame] | 37 | void onError(int error, String message); |
Kevin Chyn | 87f257a | 2018-11-27 16:26:07 -0800 | [diff] [blame^] | 38 | // 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 Chyn | e92cdae | 2018-11-21 16:35:04 -0800 | [diff] [blame] | 41 | // 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 Chyn | a24e9fd | 2018-08-27 12:39:17 -0700 | [diff] [blame] | 45 | } |