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 17 package com.android.systemui.biometrics; 18 19 /** 20 * Callback interface for dialog views. These should be implemented by the controller (e.g. 21 * FingerprintDialogImpl) and passed into their views (e.g. FingerprintDialogView). 22 */ 23 public interface DialogViewCallback { 24 /** 25 * Invoked when the user cancels authentication by tapping outside the prompt, etc. The dialog 26 * should be dismissed. 27 */ 28 void onUserCanceled(); 29 30 /** 31 * Invoked when an error is shown. The dialog should be dismissed after a set amount of time. 32 */ 33 void onErrorShown(); 34 35 /** 36 * Invoked when the negative button is pressed. The client should be notified and the dialog 37 * should be dismissed. 38 */ 39 void onNegativePressed(); 40 41 /** 42 * Invoked when the positive button is pressed. The client should be notified and the dialog 43 * should be dismissed. 44 */ 45 void onPositivePressed(); 46 47 /** 48 * Invoked when the "try again" button is pressed. 49 */ 50 void onTryAgainPressed(); 51 } 52