From d1cdc3abc537abcfef4e398e2993589f7cc6acf7 Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Wed, 5 Jun 2019 13:43:58 -0700 Subject: [PATCH] Partial revert of ag/7508382 to retain back button responsiveness in BiomtericPrompt The layout should be focusable and be set to focused in order for the back button events to be received, since the key listener is set on the layout. Fixes: 133781042 Test: Back button cancels authentication Test: No regression in tests mentioned in the CL above Change-Id: I7d78bea400e8791e296a53603414095cfca62ec1 --- .../com/android/systemui/biometrics/BiometricDialogView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java b/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java index 5717a54fd8a07..18b8a9c859b1c 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java @@ -228,6 +228,10 @@ public abstract class BiometricDialogView extends LinearLayout { showTryAgainButton(false /* show */); mCallback.onTryAgainPressed(); }); + + // Must set these in order for the back button events to be received. + mLayout.setFocusableInTouchMode(true); + mLayout.requestFocus(); } public void onSaveState(Bundle bundle) {