1 /* 2 * Copyright (C) 2021 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 listener for the high-brightness mode (HBM) transitions. This allows other components to 20 * perform certain actions when the HBM is toggled on or off. For example, a display manager 21 * implementation can subscribe to these events from UdfpsController and adjust the display's 22 * refresh rate when the HBM is enabled. 23 * 24 * @hide 25 */ 26 oneway interface IUdfpsHbmListener { 27 28 /** HBM that applies to the whole screen. */ 29 const int GLOBAL_HBM = 0; 30 31 /** HBM that only applies to a portion of the screen. */ 32 const int LOCAL_HBM = 1; 33 34 /** 35 * UdfpsController will call this method when the HBM is enabled. 36 * 37 * @param hbmType The type of HBM that was enabled. See 38 * {@link com.android.systemui.biometrics.UdfpsHbmTypes}. 39 * @param displayId The displayId for which the HBM is enabled. See 40 * {@link android.view.Display#getDisplayId()}. 41 */ onHbmEnabled(int hbmType, int displayId)42 void onHbmEnabled(int hbmType, int displayId); 43 44 /** 45 * UdfpsController will call this method when the HBM is disabled. 46 * 47 * @param hbmType The type of HBM that was disabled. See 48 * {@link com.android.systemui.biometrics.UdfpsHbmTypes}. 49 * @param displayId The displayId for which the HBM is disabled. See 50 * {@link android.view.Display#getDisplayId()}. 51 */ onHbmDisabled(int hbmType, int displayId)52 void onHbmDisabled(int hbmType, int displayId); 53 } 54 55