Fix disappearing biometric prompt for the managed profile
In several circumstances, the ConfirmDeviceCredentialActivity may be started while the device is being unlocked - particularly, when the managed profile on the device has a separate challenge and the user is attempting to start an activity associated with the locked, managed profile. For example, by double-tapping a notification from the managed profile or trying to reply to such a notification. When the ConfirmDeviceCredentialActivity is started after the user has entered the primary lockscreen challenge but before the keyguard is fully dismissed, the activity may be started and immediately paused. If the activity then calls finish() in onPause(), the biometric prompt will disappear and the user will not have a chance to authenticate. Fix the issue by only calling finish() in onPause() if the biometric prompt has not been shown. The flag indicating whether the activity is waiting for biometric prompt or not needs to be cleared whenever the biometric prompt invokes the callback, so that the activity will correctly call finish() if the user does abort authentication. Bug: 153689182 Bug: 141470517 Test: Manual, set up a work profile and double-tap a work notification or try to Reply to a work GMail notification. Change-Id: I9d3d3000b99d0eb4b44b90f5a0c2856db5f32144
Loading
Please register or sign in to comment