commit | a847a03c7d42444e15b7762d307a6ef67dc1a9e8 | [log] [tgz] |
---|---|---|
author | Kevin Chyn <kchyn@google.com> | Fri Jan 17 14:17:03 2020 -0800 |
committer | Kevin Chyn <kchyn@google.com> | Fri Jan 17 14:59:28 2020 -0800 |
tree | bdbb4835a1afac00b006789fa71d28179b576846 | |
parent | 9670c9e1180d6385d1b52b5fde2d97499f0f5b1f [diff] [blame] |
Fix corner case when auth is canceled but credential was already confirmed Bug: 145991060 Test: atest AuthControllerTest Change-Id: I94cd579c47b1299c498e0736d7f584e32d903029
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java index e0ca1ac..875619a 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -338,7 +338,13 @@ @Override public void hideAuthenticationDialog() { - if (DEBUG) Log.d(TAG, "hideAuthenticationDialog"); + if (DEBUG) Log.d(TAG, "hideAuthenticationDialog: " + mCurrentDialog); + + if (mCurrentDialog == null) { + // Could be possible if the caller canceled authentication after credential success + // but before the client was notified. + return; + } mCurrentDialog.dismissFromSystemServer();