Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 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 | */ |
Jim Miller | 5ecd811 | 2013-01-09 18:50:26 -0800 | [diff] [blame] | 16 | package com.android.keyguard; |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 17 | |
| 18 | import android.app.admin.DevicePolicyManager; |
Adam Powell | 43a372f | 2013-09-27 17:43:53 -0700 | [diff] [blame] | 19 | import android.graphics.Bitmap; |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 20 | import android.hardware.biometrics.BiometricSourceType; |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 21 | import android.media.AudioManager; |
John Spurlock | 385a63d | 2013-10-30 19:40:48 -0400 | [diff] [blame] | 22 | import android.os.SystemClock; |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 23 | import android.telephony.TelephonyManager; |
Adrian Roos | e99bc05 | 2017-11-20 17:55:31 +0100 | [diff] [blame] | 24 | import android.view.WindowManagerPolicyConstants; |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 25 | |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 26 | import com.android.internal.telephony.IccCardConstants; |
Lucas Dupin | ef88654 | 2018-01-03 16:03:07 -0800 | [diff] [blame] | 27 | import com.android.systemui.statusbar.KeyguardIndicationController; |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 28 | |
Robert Snoeberger | 9c1074f | 2018-12-07 17:35:21 -0500 | [diff] [blame] | 29 | import java.util.TimeZone; |
| 30 | |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 31 | /** |
| 32 | * Callback for general information relevant to lock screen. |
| 33 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 34 | public class KeyguardUpdateMonitorCallback { |
John Spurlock | 385a63d | 2013-10-30 19:40:48 -0400 | [diff] [blame] | 35 | |
| 36 | private static final long VISIBILITY_CHANGED_COLLAPSE_MS = 1000; |
| 37 | private long mVisibilityChangedCalled; |
| 38 | private boolean mShowing; |
| 39 | |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 40 | /** |
| 41 | * Called when the battery status changes, e.g. when plugged in or unplugged, charge |
| 42 | * level, etc. changes. |
| 43 | * |
| 44 | * @param status current battery status |
| 45 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 46 | public void onRefreshBatteryInfo(KeyguardUpdateMonitor.BatteryStatus status) { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Called once per minute or when the time changes. |
| 50 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 51 | public void onTimeChanged() { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 52 | |
| 53 | /** |
Robert Snoeberger | 9c1074f | 2018-12-07 17:35:21 -0500 | [diff] [blame] | 54 | * Called when time zone changes. |
| 55 | * |
| 56 | * @note When time zone changes, onTimeChanged will be called too. |
| 57 | */ |
| 58 | public void onTimeZoneChanged(TimeZone timeZone) { } |
| 59 | |
| 60 | /** |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 61 | * Called when the carrier PLMN or SPN changes. |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 62 | */ |
Jason Monk | 9ff69bd | 2014-12-02 16:43:17 -0500 | [diff] [blame] | 63 | public void onRefreshCarrierInfo() { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 64 | |
| 65 | /** |
| 66 | * Called when the ringer mode changes. |
| 67 | * @param state the current ringer state, as defined in |
| 68 | * {@link AudioManager#RINGER_MODE_CHANGED_ACTION} |
| 69 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 70 | public void onRingerModeChanged(int state) { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 71 | |
| 72 | /** |
| 73 | * Called when the phone state changes. String will be one of: |
| 74 | * {@link TelephonyManager#EXTRA_STATE_IDLE} |
| 75 | * {@link TelephonyManager@EXTRA_STATE_RINGING} |
| 76 | * {@link TelephonyManager#EXTRA_STATE_OFFHOOK |
| 77 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 78 | public void onPhoneStateChanged(int phoneState) { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 79 | |
| 80 | /** |
Danielle Millett | f6d0fc1 | 2012-10-23 16:16:52 -0400 | [diff] [blame] | 81 | * Called when the visibility of the keyguard changes. |
| 82 | * @param showing Indicates if the keyguard is now visible. |
| 83 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 84 | public void onKeyguardVisibilityChanged(boolean showing) { } |
Danielle Millett | f6d0fc1 | 2012-10-23 16:16:52 -0400 | [diff] [blame] | 85 | |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 86 | public void onKeyguardVisibilityChangedRaw(boolean showing) { |
John Spurlock | 385a63d | 2013-10-30 19:40:48 -0400 | [diff] [blame] | 87 | final long now = SystemClock.elapsedRealtime(); |
| 88 | if (showing == mShowing |
| 89 | && (now - mVisibilityChangedCalled) < VISIBILITY_CHANGED_COLLAPSE_MS) return; |
| 90 | onKeyguardVisibilityChanged(showing); |
| 91 | mVisibilityChangedCalled = now; |
| 92 | mShowing = showing; |
| 93 | } |
| 94 | |
Danielle Millett | f6d0fc1 | 2012-10-23 16:16:52 -0400 | [diff] [blame] | 95 | /** |
Adrian Roos | b601162 | 2014-05-14 15:52:53 +0200 | [diff] [blame] | 96 | * Called when the keyguard enters or leaves bouncer mode. |
| 97 | * @param bouncer if true, keyguard is now in bouncer mode. |
| 98 | */ |
| 99 | public void onKeyguardBouncerChanged(boolean bouncer) { } |
| 100 | |
| 101 | /** |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 102 | * Called when visibility of lockscreen clock changes, such as when |
| 103 | * obscured by a widget. |
| 104 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 105 | public void onClockVisibilityChanged() { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 106 | |
| 107 | /** |
| 108 | * Called when the device becomes provisioned |
| 109 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 110 | public void onDeviceProvisioned() { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 111 | |
| 112 | /** |
| 113 | * Called when the device policy changes. |
| 114 | * See {@link DevicePolicyManager#ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED} |
| 115 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 116 | public void onDevicePolicyManagerStateChanged() { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 117 | |
| 118 | /** |
Chris Wren | f41c61b | 2012-11-29 15:19:54 -0500 | [diff] [blame] | 119 | * Called when the user change begins. |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 120 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 121 | public void onUserSwitching(int userId) { } |
Chris Wren | f41c61b | 2012-11-29 15:19:54 -0500 | [diff] [blame] | 122 | |
| 123 | /** |
| 124 | * Called when the user change is complete. |
| 125 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 126 | public void onUserSwitchComplete(int userId) { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 127 | |
| 128 | /** |
Bill Lin | ef81cbd | 2018-07-05 17:48:49 +0800 | [diff] [blame] | 129 | * Called when the Telephony capable |
| 130 | * @param capable |
| 131 | */ |
| 132 | public void onTelephonyCapable(boolean capable) { } |
| 133 | |
| 134 | /** |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 135 | * Called when the SIM state changes. |
Jim Miller | 52a6133 | 2014-11-12 19:29:51 -0800 | [diff] [blame] | 136 | * @param slotId |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 137 | * @param simState |
| 138 | */ |
Jim Miller | 52a6133 | 2014-11-12 19:29:51 -0800 | [diff] [blame] | 139 | public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simState) { } |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 140 | |
| 141 | /** |
Amith Yamasani | 6fc1d4e | 2013-05-08 16:43:58 -0700 | [diff] [blame] | 142 | * Called when the user's info changed. |
| 143 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 144 | public void onUserInfoChanged(int userId) { } |
Amith Yamasani | 6fc1d4e | 2013-05-08 16:43:58 -0700 | [diff] [blame] | 145 | |
| 146 | /** |
Jorim Jaggi | dadafd4 | 2016-09-30 07:20:25 -0700 | [diff] [blame] | 147 | * Called when a user got unlocked. |
| 148 | */ |
| 149 | public void onUserUnlocked() { } |
| 150 | |
| 151 | /** |
Adam Cohen | efb3ffb | 2012-11-06 16:55:32 -0800 | [diff] [blame] | 152 | * Called when boot completed. |
| 153 | * |
| 154 | * Note, this callback will only be received if boot complete occurs after registering with |
| 155 | * KeyguardUpdateMonitor. |
| 156 | */ |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 157 | public void onBootCompleted() { } |
Jim Miller | 8f09fd2 | 2013-03-14 19:04:28 -0700 | [diff] [blame] | 158 | |
| 159 | /** |
Brian Colonna | 7fce380 | 2013-09-17 15:51:32 -0400 | [diff] [blame] | 160 | * Called when the emergency call button is pressed. |
| 161 | */ |
John Spurlock | 813552c | 2014-09-19 08:30:21 -0400 | [diff] [blame] | 162 | public void onEmergencyCallAction() { } |
Adam Powell | 43a372f | 2013-09-27 17:43:53 -0700 | [diff] [blame] | 163 | |
Jim Miller | 20daffd | 2013-10-07 14:59:53 -0700 | [diff] [blame] | 164 | /** |
| 165 | * Called when the transport background changes. |
| 166 | * @param bitmap |
| 167 | */ |
Adam Powell | 43a372f | 2013-09-27 17:43:53 -0700 | [diff] [blame] | 168 | public void onSetBackground(Bitmap bitmap) { |
Adam Powell | 43a372f | 2013-09-27 17:43:53 -0700 | [diff] [blame] | 169 | } |
Jim Miller | 20daffd | 2013-10-07 14:59:53 -0700 | [diff] [blame] | 170 | |
| 171 | /** |
Jorim Jaggi | 0d210f6 | 2015-07-10 14:24:44 -0700 | [diff] [blame] | 172 | * Called when the device has started waking up. |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 173 | * |
| 174 | * @deprecated use {@link com.android.systemui.keyguard.WakefulnessLifecycle}. |
Jim Miller | 20daffd | 2013-10-07 14:59:53 -0700 | [diff] [blame] | 175 | */ |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 176 | @Deprecated |
Jorim Jaggi | 0d210f6 | 2015-07-10 14:24:44 -0700 | [diff] [blame] | 177 | public void onStartedWakingUp() { } |
Jim Miller | 20daffd | 2013-10-07 14:59:53 -0700 | [diff] [blame] | 178 | |
| 179 | /** |
Jorim Jaggi | 95e4038 | 2015-09-16 15:53:42 -0700 | [diff] [blame] | 180 | * Called when the device has started going to sleep. |
| 181 | * @param why see {@link #onFinishedGoingToSleep(int)} |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 182 | * |
| 183 | * @deprecated use {@link com.android.systemui.keyguard.WakefulnessLifecycle}. |
Jorim Jaggi | 95e4038 | 2015-09-16 15:53:42 -0700 | [diff] [blame] | 184 | */ |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 185 | @Deprecated |
Jorim Jaggi | 95e4038 | 2015-09-16 15:53:42 -0700 | [diff] [blame] | 186 | public void onStartedGoingToSleep(int why) { } |
| 187 | |
| 188 | /** |
Jorim Jaggi | 0d210f6 | 2015-07-10 14:24:44 -0700 | [diff] [blame] | 189 | * Called when the device has finished going to sleep. |
Adrian Roos | e99bc05 | 2017-11-20 17:55:31 +0100 | [diff] [blame] | 190 | * @param why either {@link WindowManagerPolicyConstants#OFF_BECAUSE_OF_ADMIN}, |
| 191 | * {@link WindowManagerPolicyConstants#OFF_BECAUSE_OF_USER}, or |
| 192 | * {@link WindowManagerPolicyConstants#OFF_BECAUSE_OF_TIMEOUT}. |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 193 | * |
| 194 | * @deprecated use {@link com.android.systemui.keyguard.WakefulnessLifecycle}. |
Jim Miller | 20daffd | 2013-10-07 14:59:53 -0700 | [diff] [blame] | 195 | */ |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 196 | @Deprecated |
Jorim Jaggi | 0d210f6 | 2015-07-10 14:24:44 -0700 | [diff] [blame] | 197 | public void onFinishedGoingToSleep(int why) { } |
Adrian Roos | 2fe592d | 2014-05-17 03:11:59 +0200 | [diff] [blame] | 198 | |
| 199 | /** |
Jorim Jaggi | f1518da | 2015-07-30 11:56:36 -0700 | [diff] [blame] | 200 | * Called when the screen has been turned on. |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 201 | * |
| 202 | * @deprecated use {@link com.android.systemui.keyguard.ScreenLifecycle}. |
Jorim Jaggi | f1518da | 2015-07-30 11:56:36 -0700 | [diff] [blame] | 203 | */ |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 204 | @Deprecated |
Jorim Jaggi | f1518da | 2015-07-30 11:56:36 -0700 | [diff] [blame] | 205 | public void onScreenTurnedOn() { } |
| 206 | |
| 207 | /** |
| 208 | * Called when the screen has been turned off. |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 209 | * |
| 210 | * @deprecated use {@link com.android.systemui.keyguard.ScreenLifecycle}. |
Jorim Jaggi | f1518da | 2015-07-30 11:56:36 -0700 | [diff] [blame] | 211 | */ |
Adrian Roos | 369907f | 2017-07-14 14:53:39 +0200 | [diff] [blame] | 212 | @Deprecated |
Jorim Jaggi | f1518da | 2015-07-30 11:56:36 -0700 | [diff] [blame] | 213 | public void onScreenTurnedOff() { } |
| 214 | |
| 215 | /** |
Adrian Roos | 2fe592d | 2014-05-17 03:11:59 +0200 | [diff] [blame] | 216 | * Called when trust changes for a user. |
| 217 | */ |
| 218 | public void onTrustChanged(int userId) { } |
Jim Miller | f41fc96 | 2014-06-18 16:33:51 -0700 | [diff] [blame] | 219 | |
| 220 | /** |
Adrian Roos | 7861c66 | 2014-07-25 15:37:28 +0200 | [diff] [blame] | 221 | * Called when trust being managed changes for a user. |
| 222 | */ |
| 223 | public void onTrustManagedChanged(int userId) { } |
| 224 | |
| 225 | /** |
Adrian Roos | 94e15a5 | 2015-04-16 12:23:18 -0700 | [diff] [blame] | 226 | * Called after trust was granted with non-zero flags. |
Adrian Roos | 3c9a350 | 2014-08-06 19:09:45 +0200 | [diff] [blame] | 227 | */ |
Adrian Roos | 94e15a5 | 2015-04-16 12:23:18 -0700 | [diff] [blame] | 228 | public void onTrustGrantedWithFlags(int flags, int userId) { } |
Adrian Roos | 3c9a350 | 2014-08-06 19:09:45 +0200 | [diff] [blame] | 229 | |
| 230 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 231 | * Called when a biometric has been acquired. |
Jorim Jaggi | 83eb6bb | 2015-08-17 17:38:58 -0700 | [diff] [blame] | 232 | * <p> |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 233 | * It is guaranteed that either {@link #onBiometricAuthenticated} or |
| 234 | * {@link #onBiometricAuthFailed(BiometricSourceType)} is called after this method eventually. |
| 235 | * @param biometricSourceType |
Jorim Jaggi | 83eb6bb | 2015-08-17 17:38:58 -0700 | [diff] [blame] | 236 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 237 | public void onBiometricAcquired(BiometricSourceType biometricSourceType) { } |
Jorim Jaggi | 83eb6bb | 2015-08-17 17:38:58 -0700 | [diff] [blame] | 238 | |
| 239 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 240 | * Called when a biometric couldn't be authenticated. |
| 241 | * @param biometricSourceType |
Jorim Jaggi | 83eb6bb | 2015-08-17 17:38:58 -0700 | [diff] [blame] | 242 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 243 | public void onBiometricAuthFailed(BiometricSourceType biometricSourceType) { } |
Jorim Jaggi | 83eb6bb | 2015-08-17 17:38:58 -0700 | [diff] [blame] | 244 | |
| 245 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 246 | * Called when a biometric is recognized. |
| 247 | * @param userId the user id for which the biometric sample was authenticated |
| 248 | * @param biometricSourceType |
Jim Miller | f41fc96 | 2014-06-18 16:33:51 -0700 | [diff] [blame] | 249 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 250 | public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType) { } |
Jorim Jaggi | 007f0e8 | 2015-08-14 13:56:01 -0700 | [diff] [blame] | 251 | |
| 252 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 253 | * Called when biometric authentication provides help string (e.g. "Try again") |
Jim Miller | 9f0753f | 2015-03-23 23:59:22 -0700 | [diff] [blame] | 254 | * @param msgId |
| 255 | * @param helpString |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 256 | * @param biometricSourceType |
Jim Miller | f41fc96 | 2014-06-18 16:33:51 -0700 | [diff] [blame] | 257 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 258 | public void onBiometricHelp(int msgId, String helpString, |
| 259 | BiometricSourceType biometricSourceType) { } |
Jim Miller | 9f0753f | 2015-03-23 23:59:22 -0700 | [diff] [blame] | 260 | |
| 261 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 262 | * Called when biometric authentication method provides a semi-permanent |
| 263 | * error message (e.g. "Hardware not available"). |
| 264 | * @param msgId one of the error messages listed in |
| 265 | * {@link android.hardware.biometrics.BiometricConstants} |
Jim Miller | 9f0753f | 2015-03-23 23:59:22 -0700 | [diff] [blame] | 266 | * @param errString |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 267 | * @param biometricSourceType |
Jim Miller | 9f0753f | 2015-03-23 23:59:22 -0700 | [diff] [blame] | 268 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 269 | public void onBiometricError(int msgId, String errString, |
| 270 | BiometricSourceType biometricSourceType) { } |
Jorim Jaggi | e7b1252 | 2014-08-06 16:41:21 +0200 | [diff] [blame] | 271 | |
| 272 | /** |
| 273 | * Called when the state of face unlock changed. |
| 274 | */ |
Adrian Roos | 4a41017 | 2014-08-20 17:41:44 +0200 | [diff] [blame] | 275 | public void onFaceUnlockStateChanged(boolean running, int userId) { } |
Jorim Jaggi | 27c9b74 | 2015-04-09 10:34:49 -0700 | [diff] [blame] | 276 | |
| 277 | /** |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 278 | * Called when biometric running state changed. |
Jorim Jaggi | 27c9b74 | 2015-04-09 10:34:49 -0700 | [diff] [blame] | 279 | */ |
Gilad Bretter | cb51b8b | 2018-03-22 17:04:51 +0200 | [diff] [blame] | 280 | public void onBiometricRunningStateChanged(boolean running, |
| 281 | BiometricSourceType biometricSourceType) { } |
Jorim Jaggi | 25b4d4b | 2015-08-11 15:54:06 -0700 | [diff] [blame] | 282 | |
| 283 | /** |
| 284 | * Called when the state that the user hasn't used strong authentication since quite some time |
| 285 | * has changed. |
| 286 | */ |
Adrian Roos | 1de8bcb | 2015-08-19 16:52:52 -0700 | [diff] [blame] | 287 | public void onStrongAuthStateChanged(int userId) { } |
Jorim Jaggi | d11d1a9 | 2016-08-16 16:02:32 -0700 | [diff] [blame] | 288 | |
| 289 | /** |
| 290 | * Called when the state whether we have a lockscreen wallpaper has changed. |
| 291 | */ |
| 292 | public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) { } |
Selim Cinek | 9941539 | 2016-09-09 14:58:41 -0700 | [diff] [blame] | 293 | |
| 294 | /** |
| 295 | * Called when the dream's window state is changed. |
| 296 | * @param dreaming true if the dream's window has been created and is visible |
| 297 | */ |
| 298 | public void onDreamingStateChanged(boolean dreaming) { } |
Lucas Dupin | ef88654 | 2018-01-03 16:03:07 -0800 | [diff] [blame] | 299 | |
| 300 | /** |
| 301 | * Called when an error message needs to be presented on the keyguard. |
| 302 | * Message will be visible briefly, and might be overridden by other keyguard events, |
| 303 | * like fingerprint authentication errors. |
| 304 | * |
| 305 | * @param message Message that indicates an error. |
| 306 | * @see KeyguardIndicationController.BaseKeyguardCallback#HIDE_DELAY_MS |
| 307 | * @see KeyguardIndicationController#showTransientIndication(CharSequence) |
| 308 | */ |
| 309 | public void onTrustAgentErrorMessage(CharSequence message) { } |
Alex Chau | ff7653d | 2018-02-01 17:18:08 +0000 | [diff] [blame] | 310 | |
| 311 | |
| 312 | /** |
| 313 | * Called when a value of logout enabled is change. |
| 314 | */ |
| 315 | public void onLogoutEnabledChanged() { } |
| 316 | |
Aran Ink | 4c0d560 | 2019-06-21 14:27:32 -0400 | [diff] [blame] | 317 | /** |
| 318 | * Called when authenticated biometrics are cleared. |
| 319 | */ |
| 320 | public void onBiometricsCleared() { } |
| 321 | |
Jim Miller | bbf1a74 | 2012-07-17 18:30:30 -0700 | [diff] [blame] | 322 | } |