From 7c165162b8fbee951d8d7371f4b6ddb99d2f9453 Mon Sep 17 00:00:00 2001 From: Heemin Seog Date: Thu, 7 May 2020 00:31:33 -0700 Subject: [PATCH] Partial revert of keyguard checks startPreHideAnimation could be called even when the keyguard isn't showing. This leads to some inconsistent state if we don't call mBouncer.startPreHideAnimation. Bug: 155706342 Test: manual (log startPreHideAnimation calls) Change-Id: I039548a0e9a623a5e478e94490d3b695ae11d15c --- .../systemui/car/keyguard/CarKeyguardViewController.java | 4 ++-- 1 file changed, 2 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 baa6ac945a8a1..06d14449aa0de 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java @@ -213,7 +213,7 @@ public class CarKeyguardViewController extends OverlayViewController implements @Override public void onCancelClicked() { - if (!mShowing) return; + if (mBouncer == null) return; getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false); getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false); @@ -234,7 +234,7 @@ public class CarKeyguardViewController extends OverlayViewController implements @Override public void startPreHideAnimation(Runnable finishRunnable) { - if (!mShowing) return; + if (mBouncer == null) return; mBouncer.startPreHideAnimation(finishRunnable); }