summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-06-03 16:56:13 +0200
committerSelim Cinek <cinek@google.com>2015-06-04 15:38:29 +0000
commitcb9400aa23b81f12d8af198187fc799d6bcf164a (patch)
tree2216e564f49588747c9eb2290ff26f55fb081821
parent72bcaa20afab21eedf749c7a4bdb807dd41b06f8 (diff)
downloadframeworks_base-cb9400aa23b81f12d8af198187fc799d6bcf164a.zip
frameworks_base-cb9400aa23b81f12d8af198187fc799d6bcf164a.tar.gz
frameworks_base-cb9400aa23b81f12d8af198187fc799d6bcf164a.tar.bz2
Enabled expansion and dragging down when QS is expanded
Previously going to the full shade and expanding notifications where disabled when QS was expanded even though there was enough space to allow it. This is now allowed again in order to have a consistent experience. Bug: 19712809 Change-Id: Ie756d9c3fbf9dc2e60a05d02f0f4cc5dd6c7ebe0
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java9
3 files changed, 11 insertions, 9 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 711956a..4bc317a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1075,8 +1075,12 @@ public class NotificationPanelView extends PanelView implements
};
private void animateHeaderSlidingIn() {
- mHeaderAnimating = true;
- getViewTreeObserver().addOnPreDrawListener(mStartHeaderSlidingIn);
+ // If the QS is already expanded we don't need to slide in the header as it's already
+ // visible.
+ if (!mQsExpanded) {
+ mHeaderAnimating = true;
+ getViewTreeObserver().addOnPreDrawListener(mStartHeaderSlidingIn);
+ }
}
private void animateHeaderSlidingOut() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 3b91751..6a8f8ee 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -171,7 +171,6 @@ public class StatusBarWindowView extends FrameLayout {
if (mNotificationPanel.isFullyExpanded()
&& mStackScrollLayout.getVisibility() == View.VISIBLE
&& mService.getBarState() == StatusBarState.KEYGUARD
- && !mService.isQsExpanded()
&& !mService.isBouncerShowing()) {
intercept = mDragDownHelper.onInterceptTouchEvent(ev);
// wake up on a touch down event, if dozing
@@ -195,7 +194,7 @@ public class StatusBarWindowView extends FrameLayout {
@Override
public boolean onTouchEvent(MotionEvent ev) {
boolean handled = false;
- if (mService.getBarState() == StatusBarState.KEYGUARD && !mService.isQsExpanded()) {
+ if (mService.getBarState() == StatusBarState.KEYGUARD) {
handled = mDragDownHelper.onTouchEvent(ev);
}
if (!handled) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index e6f16e5..d8f6bcd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -812,8 +812,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
handleEmptySpaceClick(ev);
boolean expandWantsIt = false;
- if (mIsExpanded && !mSwipingInProgress && !mOnlyScrollingInThisMotion
- && isScrollingEnabled()) {
+ if (mIsExpanded && !mSwipingInProgress && !mOnlyScrollingInThisMotion) {
if (isCancelOrUp) {
mExpandHelper.onlyObserveMovements(false);
}
@@ -1567,7 +1566,7 @@ public class NotificationStackScrollLayout extends ViewGroup
initDownStates(ev);
handleEmptySpaceClick(ev);
boolean expandWantsIt = false;
- if (!mSwipingInProgress && !mOnlyScrollingInThisMotion && isScrollingEnabled()) {
+ if (!mSwipingInProgress && !mOnlyScrollingInThisMotion) {
expandWantsIt = mExpandHelper.onInterceptTouchEvent(ev);
}
boolean scrollWantsIt = false;
@@ -2268,11 +2267,11 @@ public class NotificationStackScrollLayout extends ViewGroup
private void updateScrollPositionOnExpandInBottom(ExpandableView view) {
if (view instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
- if (row.isUserLocked()) {
+ if (row.isUserLocked() && row != getFirstChildNotGone()) {
// We are actually expanding this view
float endPosition = row.getTranslationY() + row.getActualHeight();
int stackEnd = mMaxLayoutHeight - mBottomStackPeekSize -
- mBottomStackSlowDownHeight;
+ mBottomStackSlowDownHeight + (int) mStackTranslation;
if (endPosition > stackEnd) {
mOwnScrollY += endPosition - stackEnd;
mDisallowScrollingInThisMotion = true;