Only enable setAntiBurnInOffsetX() in AOD(Ambient) condition
NotificationPanelView detect the ACTION_DOWN X-position for expanding Panel
and dispatch x-offset to QSFrame and StackScroller
However, StackScroller reset the translateX via updateAntiBurnInTranslation()
Base on previous patches to enhance setAntiBurnInOffsetX policy
1. ag/3536525 (Fixes: 72527703)
2. ag/3846247 (Fixes: 77541088)
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayoutTest.java
Change-Id: I52c86e865d97282e40b6f2847a2ff0190e4d80e9
Fix: 110102296
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 165b9b4..969b1b7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -2491,7 +2491,7 @@
}
protected void setVerticalPanelTranslation(float translation) {
- mNotificationStackScroller.setTranslationX(translation);
+ mNotificationStackScroller.setVerticalPanelTranslation(translation);
mQsFrame.setTranslationX(translation);
int size = mVerticalTranslationListener.size();
for (int i = 0; i < size; i++) {