From b29814c4ccdec4c1fbaaa3a6d633b104bee06184 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 5 Aug 2015 19:03:01 -0700 Subject: [PATCH] Don't show fingerprint cancellation messages in keyguard Cancellation messages can come from a variety of sources and are not user-actionable. As a result, we just shouldn't show them. Fixes bug 22863862 Change-Id: I2154c774fd5ac7477e01d1cbf3bdde2d1929363b --- .../systemui/statusbar/phone/KeyguardBottomAreaView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 6627360a641a5..42a2f9080fbd5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -29,6 +29,7 @@ import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Configuration; +import android.hardware.fingerprint.FingerprintManager; import android.os.AsyncTask; import android.os.Bundle; import android.os.IBinder; @@ -601,6 +602,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } private final BroadcastReceiver mDevicePolicyReceiver = new BroadcastReceiver() { + @Override public void onReceive(Context context, Intent intent) { post(new Runnable() { @Override @@ -671,7 +673,8 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override public void onFingerprintError(int msgId, String errString) { - if (!KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed()) { + if (!KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed() + || msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED) { return; } // TODO: Go to bouncer if this is "too many attempts" (lockout) error.