From 89441981710c01079c9484ff85eef9c533f90225 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Tue, 28 Sep 2021 18:29:24 -0400 Subject: [PATCH] Don't expand the panel on ACTION_CANCEL if the keyguard is fading away. This was causing us to expand the notification panel after swiping to unlock to an app that is locked in landscape. Bug: 196364593 Test: open fruit ninja (which is locked to landscape) and swipe to unlock, notice that panel does not expand on unlock Change-Id: I30ce572a370be666ea4a6f17c6dc63166c2cd35c --- .../systemui/statusbar/phone/PanelViewController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 51cae8c4af7f1..1839289e5474d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -393,6 +393,12 @@ public abstract class PanelViewController { // started if (onKeyguard) { expand = true; + } else if (mKeyguardStateController.isKeyguardFadingAway()) { + // If we're in the middle of dismissing the keyguard, don't expand due to the + // cancelled gesture. Gesture cancellation during an unlock is expected in some + // situations, such keeping your finger down while swiping to unlock to an app + // that is locked in landscape (the rotation will cancel the touch event). + expand = false; } else { expand = !mPanelClosedOnDown; }