AOD: Show fingerprint error messages
Change-Id: I6570bffed1632b5e42ad5f82f7e0ab6192e04e1d
Fixes: 34902351
Test: Enable fingerprint, get notification on Ambient Display, try to unlock with wrong finger. Verify that the fingerprint not recognized message shows
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index d599ec1..bc992d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -87,6 +87,7 @@
private KeyguardUpdateMonitorCallback mUpdateMonitor;
private final DevicePolicyManager mDevicePolicyManager;
+ private boolean mDozing;
public KeyguardIndicationController(Context context, ViewGroup indicationArea,
LockIcon lockIcon) {
@@ -139,7 +140,7 @@
return;
}
- if (mDevicePolicyManager.isDeviceManaged()) {
+ if (!mDozing && mDevicePolicyManager.isDeviceManaged()) {
final CharSequence organizationName =
mDevicePolicyManager.getDeviceOwnerOrganizationName();
if (organizationName != null) {
@@ -224,6 +225,18 @@
if (mVisible) {
// Walk down a precedence-ordered list of what should indication
// should be shown based on user or device state
+ if (mDozing) {
+ // If we're dozing, never show a persistent indication.
+ if (!TextUtils.isEmpty(mTransientIndication)) {
+ mTextView.switchIndication(mTransientIndication);
+ mTextView.setTextColor(mTransientTextColor);
+
+ } else {
+ mTextView.switchIndication(null);
+ }
+ return;
+ }
+
if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) {
mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked);
mTextView.setTextColor(Color.WHITE);
@@ -319,6 +332,12 @@
}
};
+ public void setDozing(boolean dozing) {
+ mDozing = dozing;
+ updateIndication();
+ updateDisclosure();
+ }
+
protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback {
private int mLastSuccessiveErrorMessage = -1;
@@ -349,7 +368,8 @@
int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null);
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
mStatusBarKeyguardViewManager.showBouncerMessage(helpString, errorColor);
- } else if (updateMonitor.isDeviceInteractive()) {
+ } else if (updateMonitor.isDeviceInteractive()
+ || mDozing && updateMonitor.isScreenOn()) {
mLockIcon.setTransientFpError(true);
showTransientIndication(helpString, errorColor);
mHandler.removeMessages(MSG_CLEAR_FP_MSG);