diff options
author | Matt Pietal <mpietal@google.com> | 2022-08-19 14:13:12 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-08-24 01:43:38 +0000 |
commit | e1617c48678029b4f7d6d1c95de2fa00341e58f8 (patch) | |
tree | b643e01f8a89632e493dd54edc5622d9c545b9e9 | |
parent | 1442a8d02cfaebd77a1facd64c1f28ce5894063d (diff) | |
download | base-e1617c48678029b4f7d6d1c95de2fa00341e58f8.tar.gz |
Fix shade collapse on keyguard with bypass enabled
Only with face unlock + bypass enabled, when dragging down the shade
over keyguard, the end motion event was forcing the shade to collapse
again, due to an incorrect check on the keyguard state. Use the
KeyguardStateController.isShowing() method instead, which is a more
accurate check on keyguard state.
Fixes: 242813247
Test: All combinations of face unlock enabled/disabled, notifications
visible on lockscreen on/off, notification redacted on/off, face
bypass on/off
Change-Id: I99c6ced66f3269dbf4e6df1d078d7c793492c157
(cherry picked from commit e11a139facc0fca468cbb971aa4a5965fe9040a4)
Merged-In: I99c6ced66f3269dbf4e6df1d078d7c793492c157
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java | 6 |
1 files changed, 2 insertions, 4 deletions
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 3d3e6ed26fe2..3e10166e4c3e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -395,7 +395,7 @@ public abstract class PanelViewController { mInitialOffsetOnTouch = expandedHeight; mInitialTouchY = newY; mInitialTouchX = newX; - mInitialTouchFromKeyguard = mStatusBarStateController.getState() == StatusBarState.KEYGUARD; + mInitialTouchFromKeyguard = mKeyguardStateController.isShowing(); if (startTracking) { mTouchSlopExceeded = true; setExpandedHeight(mInitialOffsetOnTouch); @@ -414,9 +414,7 @@ public abstract class PanelViewController { float vectorVel = (float) Math.hypot( mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); - final boolean onKeyguard = - mStatusBarStateController.getState() == StatusBarState.KEYGUARD; - + final boolean onKeyguard = mKeyguardStateController.isShowing(); final boolean expand; if (mKeyguardStateController.isKeyguardFadingAway() || (mInitialTouchFromKeyguard && !onKeyguard)) { |