From dbdd06ca852e83131a5fc3996ea74ddcf08c875c Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Fri, 17 Jan 2020 13:28:42 -0800 Subject: [PATCH] No longer need to cancel authentication from ConfirmDeviceCredentialActivity CDCA no longer needs to cancel authentication in onPause. Since it internally invokes BiometricPrompt, and BiometricPrompt's components e.g. BiometricService and AuthController are aware of the "top-ness" of its client, this code is redundant. Fixes: 145991060 Test: Follow comment#3 in the bug above, repeat 10+ times Test: Set up work profile, set up work profile password. Open work profile app, but before entering password, swipe up to go to home screen. Authentication is cancelled as expected. Change-Id: I0b4d7d89cb9801ddbb6e3bd07f71191035cc75ec --- .../settings/password/ConfirmDeviceCredentialActivity.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java index cc30a92ed51..8947f8fa7e2 100644 --- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java +++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java @@ -246,13 +246,6 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity { super.onPause(); if (!isChangingConfigurations()) { mGoingToBackground = true; - if (mBiometricFragment != null) { - Log.d(TAG, "Authenticating: " + mBiometricFragment.isAuthenticating()); - if (mBiometricFragment.isAuthenticating()) { - mBiometricFragment.cancel(); - } - } - finish(); } else { mGoingToBackground = false;