1 /*
2  * Copyright (C) 2022 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.fingerprint;
17 
18 /**
19  * A callback for UDFPS refresh rate. This allows other components to
20  * perform certain actions when the refresh rate is enabled or disabled.
21  * For example, a display manager implementation can subscribe to these
22  * events from UdfpsController when refresh rate is enabled or disabled.
23  *
24  * @hide
25  */
26 oneway interface IUdfpsRefreshRateRequestCallback {
27     /**
28      * Sets the appropriate display refresh rate for UDFPS.
29      *
30      * @param displayId The displayId for which the refresh rate should be set. See
31      *        {@link android.view.Display#getDisplayId()}.
32      */
onRequestEnabled(int displayId)33     void onRequestEnabled(int displayId);
34 
35     /**
36      * Unsets the appropriate display refresh rate for UDFPS.
37      *
38      * @param displayId The displayId for which the refresh rate should be unset. See
39      *        {@link android.view.Display#getDisplayId()}.
40      */
onRequestDisabled(int displayId)41     void onRequestDisabled(int displayId);
42 
43     /**
44      * To avoid delay in switching refresh rate when activating LHBM, allow screens to request
45      * higher refersh rate if auth is possible on particular screen
46      *
47      * @param displayId The displayId for which the refresh rate should be unset. See
48      *        {@link android.view.Display#getDisplayId()}.
49      * @param isPossible If authentication is possible on particualr screen
50      */
onAuthenticationPossible(int displayId, boolean isPossible)51     void onAuthenticationPossible(int displayId, boolean isPossible);
52 }
53 
54