Rename setVerticalPanelTranslation
It was never vertical :)
Test: make
Change-Id: I6b8da73cdd46835b3f4257a11b8bf75d0a2ca961
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 75adf50..512f56d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1233,7 +1233,7 @@
updateDozingVisibilities(false /* animate */);
}
- resetVerticalPanelPosition();
+ resetHorizontalPanelPosition();
updateQsState();
}
@@ -2043,7 +2043,7 @@
super.onConfigurationChanged(newConfig);
mAffordanceHelper.onConfigurationChanged();
if (newConfig.orientation != mLastOrientation) {
- resetVerticalPanelPosition();
+ resetHorizontalPanelPosition();
}
mLastOrientation = newConfig.orientation;
}
@@ -2529,7 +2529,7 @@
@Override
protected void onClosingFinished() {
super.onClosingFinished();
- resetVerticalPanelPosition();
+ resetHorizontalPanelPosition();
setClosingWithAlphaFadeout(false);
}
@@ -2546,7 +2546,7 @@
*/
protected void updateVerticalPanelPosition(float x) {
if (mNotificationStackScroller.getWidth() * 1.75f > getWidth()) {
- resetVerticalPanelPosition();
+ resetHorizontalPanelPosition();
return;
}
float leftMost = mPositionMinSideMargin + mNotificationStackScroller.getWidth() / 2;
@@ -2556,16 +2556,17 @@
x = getWidth() / 2;
}
x = Math.min(rightMost, Math.max(leftMost, x));
- setVerticalPanelTranslation(x -
- (mNotificationStackScroller.getLeft() + mNotificationStackScroller.getWidth() / 2));
+ float center =
+ mNotificationStackScroller.getLeft() + mNotificationStackScroller.getWidth() / 2;
+ setHorizontalPanelTranslation(x - center);
}
- private void resetVerticalPanelPosition() {
- setVerticalPanelTranslation(0f);
+ private void resetHorizontalPanelPosition() {
+ setHorizontalPanelTranslation(0f);
}
- protected void setVerticalPanelTranslation(float translation) {
- mNotificationStackScroller.setVerticalPanelTranslation(translation);
+ protected void setHorizontalPanelTranslation(float translation) {
+ mNotificationStackScroller.setHorizontalPanelTranslation(translation);
mQsFrame.setTranslationX(translation);
int size = mVerticalTranslationListener.size();
for (int i = 0; i < size; i++) {