diff options
| author | 2020-05-04 17:41:24 -0700 | |
|---|---|---|
| committer | 2020-05-04 17:41:24 -0700 | |
| commit | 08c9276639927f27466e49518dbd34521c2865b2 (patch) | |
| tree | c0b57a716a45b491a7c5d8ad9274889377d63a16 | |
| parent | 4a9bd0da70e161edffe09f621e5314f506ddaa2e (diff) | |
Make Keyguard window focusable so that adb shell input command registers
This change allows existing CTS tests to work properly by entering
test passwords programmatically. This is also a requirement for support-
ing back button pressed event handling.
Bug: 154829257
Test: Manual & CTS tests (atest CtsWindowManagerDeviceTestCases:KeyguardLockedTests)
Change-Id: I13db0153b792f4ef6941067dc1aa06793f033116
| -rw-r--r-- | packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java index baa6ac945a8a..cfbad7eb9904 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java @@ -171,6 +171,7 @@ public class CarKeyguardViewController extends OverlayViewController implements mKeyguardStateController.notifyKeyguardState(mShowing, /* occluded= */ false); mCarNavigationBarController.showAllKeyguardButtons(/* isSetUp= */ true); start(); + getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ true); reset(/* hideBouncerWhenShowing= */ false); notifyKeyguardUpdateMonitor(); } @@ -185,6 +186,7 @@ public class CarKeyguardViewController extends OverlayViewController implements mBouncer.hide(/* destroyView= */ true); mCarNavigationBarController.hideAllKeyguardButtons(/* isSetUp= */ true); stop(); + getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false); mKeyguardStateController.notifyKeyguardDoneFading(); mViewMediatorCallback.keyguardGone(); notifyKeyguardUpdateMonitor(); @@ -229,7 +231,9 @@ public class CarKeyguardViewController extends OverlayViewController implements @Override public void dismissAndCollapse() { - hide(/* startTime= */ 0, /* fadeoutDuration= */ 0); + if (!mBouncer.isSecure()) { + hide(/* startTime= */ 0, /* fadeoutDuration= */ 0); + } } @Override @@ -241,7 +245,6 @@ public class CarKeyguardViewController extends OverlayViewController implements @Override public void setNeedsInput(boolean needsInput) { - getOverlayViewGlobalStateController().setWindowFocusable(needsInput); getOverlayViewGlobalStateController().setWindowNeedsInput(needsInput); } |