diff options
author | Roman Birg <roman@cyngn.com> | 2016-05-19 20:47:10 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-23 11:39:17 -0700 |
commit | 4018231a6ccc45824a7d0cff5186e379f1926fef (patch) | |
tree | 0af5f2b3ac8dcafb56c5511d6ba7b896def6ed60 /packages | |
parent | 805983d24c9d2aeb3f00f99273584fc530e0b932 (diff) | |
download | frameworks_base-4018231a6ccc45824a7d0cff5186e379f1926fef.zip frameworks_base-4018231a6ccc45824a7d0cff5186e379f1926fef.tar.gz frameworks_base-4018231a6ccc45824a7d0cff5186e379f1926fef.tar.bz2 |
SystemUI: fix multi touch gestures and extra jank
The dejank utils were getting a little ahead of themselves: in between
the panel height being set to 0 (could happen often), and the user
actively trying to expand the panel, the next layout traversal from the
dejank utils would try to collapse the panel, causing bad states.
Also in the qs height animator updater, be careful to only actively
update the end height when the user did not just peak.
Finally, and most importantly, we need to disable motion event splitting
in our view that holds our notification panel logic so we can get multi
touch gestures in those views properly.
Ticket: CYNGNOS-2756
Change-Id: I2cda440d4e0548d3477c6fad88f7dac1cb59d9db
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages')
5 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java index e767ca5..2028132 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java @@ -63,6 +63,7 @@ public class NavBarInsetLayout extends FrameLayout { public NavBarInsetLayout(Context context, AttributeSet attrs) { super(context, attrs); + setMotionEventSplittingEnabled(false); mTransparentSrcPaint.setColor(0); mTransparentSrcPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC)); 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 cc98714..4de6271 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -1086,7 +1086,8 @@ public class NotificationPanelView extends PanelView implements mTwoFingerQsExpandPossible = true; } if (mTwoFingerQsExpandPossible && isOpenQsEvent(event) - && event.getY(event.getActionIndex()) < mStatusBarMinHeight) { + && event.getY(event.getActionIndex()) < mStatusBarMinHeight + && mExpandedHeight < mQsPeekHeight) { MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_QS, 1); mQsExpandImmediate = true; requestPanelHeightUpdate(); 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 e5711b8..ae565ed 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -94,7 +94,7 @@ public abstract class PanelView extends FrameLayout { public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { // update expand height - if (mHeightAnimator != null && mExpanding && mUpdateExpandOnLayout) { + if (mHeightAnimator != null && mExpanding && mUpdateExpandOnLayout && !mJustPeeked) { final int maxPanelHeight = getMaxPanelHeight(); final PropertyValuesHolder[] values = mHeightAnimator.getValues(); values[0].setFloatValues(maxPanelHeight); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index cf69cf0..20a195c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2969,7 +2969,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true); } } - if (mBrightnessChanged && upOrCancel) { + if (mBrightnessChanged && upOrCancel && !isQsExpanded()) { mBrightnessChanged = false; if (mJustPeeked && mExpandedVisible) { mNotificationPanel.fling(10, false); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 3b068d6..8c9daee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -111,6 +111,7 @@ public class PhoneStatusBarView extends PanelBar { @Override public void onPanelPeeked() { super.onPanelPeeked(); + removePendingHideExpandedRunnables(); mBar.makeExpandedVisible(false); } |