diff options
author | Jason Monk <jmonk@google.com> | 2015-01-30 19:29:31 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-01-30 19:29:31 +0000 |
commit | 84183103f4a9222ddbe22c7289f9627c74892d53 (patch) | |
tree | 5d3faa34ab7580f2a78cec8ca9d8a8e22085de7c /packages/SystemUI | |
parent | babdb0dc36290ba3a9dd040a38f9a3649fb6d510 (diff) | |
parent | 734219d9c22cbab2549d1d43d077e9e8e089730c (diff) | |
download | frameworks_base-84183103f4a9222ddbe22c7289f9627c74892d53.zip frameworks_base-84183103f4a9222ddbe22c7289f9627c74892d53.tar.gz frameworks_base-84183103f4a9222ddbe22c7289f9627c74892d53.tar.bz2 |
Fix expandSettingsPanel status bar call automerge: 3c68ca2 automerge: f388249
automerge: 734219d
* commit '734219d9c22cbab2549d1d43d077e9e8e089730c':
Fix expandSettingsPanel status bar call
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java | 32 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 3 |
2 files changed, 21 insertions, 14 deletions
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 a2ff64a..747e702 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -148,7 +148,8 @@ public class NotificationPanelView extends PanelView implements private boolean mBlockTouches; private int mNotificationScrimWaitDistance; - private boolean mTwoFingerQsExpand; + // Used for two finger gesture as well as accessibility shortcut to QS. + private boolean mQsExpandImmediate; private boolean mTwoFingerQsExpandPossible; /** @@ -475,6 +476,13 @@ public class NotificationPanelView extends PanelView implements } } + public void expandWithQs() { + if (mQsExpansionEnabled) { + mQsExpandImmediate = true; + } + expand(); + } + @Override public void fling(float vel, boolean expand) { GestureRecorder gr = ((PhoneStatusBarView) mBar).mBar.getGestureRecorder(); @@ -658,7 +666,7 @@ public class NotificationPanelView extends PanelView implements if (mExpandedHeight != 0) { handleQsDown(event); } - if (!mTwoFingerQsExpand && mQsTracking) { + if (!mQsExpandImmediate && mQsTracking) { onQsTouch(event); if (!mConflictingQsExpansionGesture) { return true; @@ -675,7 +683,7 @@ public class NotificationPanelView extends PanelView implements if (mTwoFingerQsExpandPossible && event.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN && event.getPointerCount() == 2 && event.getY(event.getActionIndex()) < mStatusBarMinHeight) { - mTwoFingerQsExpand = true; + mQsExpandImmediate = true; requestPanelHeightUpdate(); // Normally, we start listening when the panel is expanded, but here we need to start @@ -1166,7 +1174,7 @@ public class NotificationPanelView extends PanelView implements private float calculateQsTopPadding() { if (mKeyguardShowing - && (mTwoFingerQsExpand || mIsExpanding && mQsExpandedWhenExpandingStarted)) { + && (mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted)) { // Either QS pushes the notifications down when fully expanded, or QS is fully above the // notifications (mostly on tablets). maxNotifications denotes the normal top padding @@ -1200,7 +1208,7 @@ public class NotificationPanelView extends PanelView implements mScrollView.getScrollY(), mAnimateNextTopPaddingChange || animate, mKeyguardShowing - && (mTwoFingerQsExpand || mIsExpanding && mQsExpandedWhenExpandingStarted)); + && (mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted)); mAnimateNextTopPaddingChange = false; } @@ -1313,7 +1321,7 @@ public class NotificationPanelView extends PanelView implements min = Math.max(min, minHeight); } int maxHeight; - if (mTwoFingerQsExpand || mQsExpanded || mIsExpanding && mQsExpandedWhenExpandingStarted) { + if (mQsExpandImmediate || mQsExpanded || mIsExpanding && mQsExpandedWhenExpandingStarted) { maxHeight = calculatePanelHeightQsExpanded(); } else { maxHeight = calculatePanelHeightShade(); @@ -1328,10 +1336,10 @@ public class NotificationPanelView extends PanelView implements @Override protected void onHeightUpdated(float expandedHeight) { - if (!mQsExpanded || mTwoFingerQsExpand || mIsExpanding && mQsExpandedWhenExpandingStarted) { + if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) { positionClockAndNotifications(); } - if (mTwoFingerQsExpand || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null + if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) { float t; if (mKeyguardShowing) { @@ -1555,7 +1563,7 @@ public class NotificationPanelView extends PanelView implements } else { setListening(true); } - mTwoFingerQsExpand = false; + mQsExpandImmediate = false; mTwoFingerQsExpandPossible = false; } @@ -1573,7 +1581,7 @@ public class NotificationPanelView extends PanelView implements @Override protected void setOverExpansion(float overExpansion, boolean isPixels) { - if (mConflictingQsExpansionGesture || mTwoFingerQsExpand) { + if (mConflictingQsExpansionGesture || mQsExpandImmediate) { return; } if (mStatusBar.getBarState() != StatusBarState.KEYGUARD) { @@ -1593,7 +1601,7 @@ public class NotificationPanelView extends PanelView implements protected void onTrackingStarted() { super.onTrackingStarted(); if (mQsFullyExpanded) { - mTwoFingerQsExpand = true; + mQsExpandImmediate = true; } if (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED) { @@ -1817,7 +1825,7 @@ public class NotificationPanelView extends PanelView implements @Override protected boolean fullyExpandedClearAllVisible() { return mNotificationStackScroller.isDismissViewNotGone() - && mNotificationStackScroller.isScrolledToBottom() && !mTwoFingerQsExpand; + && mNotificationStackScroller.isScrolledToBottom() && !mQsExpandImmediate; } @Override 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 25a2f93..d286441 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2206,8 +2206,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, // Settings are not available in setup if (!mUserSetup) return; - mNotificationPanel.expand(); - mNotificationPanel.openQs(); + mNotificationPanel.expandWithQs(); if (false) postStartTracing(); } |