Fix Panel position may not update when device screen off / on quickly.
Due to framework side will not callback onScreenTurningOn() when device screen off / on quickly,
So NotificationPanel will not called onScreenTurningOn to update panel position.
There is also a potential issue for cancel touch will be ignored when touch disable
in onFinishedGoingToSleep().
Let ACTION_CANCEL can pass even touch disable to recover Panel position by fling back.
Bug: 79336031
Test: Manual
Change-Id: I45f2fbd8bfef99d86c3d023f07d2fd051d98f083
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 347a4b0..bef6944 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -252,7 +252,8 @@
@Override
public boolean onTouchEvent(MotionEvent event) {
- if (mInstantExpanding || mTouchDisabled
+ if (mInstantExpanding
+ || (mTouchDisabled && event.getActionMasked() != MotionEvent.ACTION_CANCEL)
|| (mMotionAborted && event.getActionMasked() != MotionEvent.ACTION_DOWN)) {
return false;
}