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
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 6627360..42a2f90 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.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 @@
}
private final BroadcastReceiver mDevicePolicyReceiver = new BroadcastReceiver() {
+ @Override
public void onReceive(Context context, Intent intent) {
post(new Runnable() {
@Override
@@ -671,7 +673,8 @@
@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.