am cb9400aa: Enabled expansion and dragging down when QS is expanded
* commit 'cb9400aa23b81f12d8af198187fc799d6bcf164a': Enabled expansion and dragging down when QS is expanded
This commit is contained in:
@@ -1075,8 +1075,12 @@ public class NotificationPanelView extends PanelView implements
|
|||||||
};
|
};
|
||||||
|
|
||||||
private void animateHeaderSlidingIn() {
|
private void animateHeaderSlidingIn() {
|
||||||
mHeaderAnimating = true;
|
// If the QS is already expanded we don't need to slide in the header as it's already
|
||||||
getViewTreeObserver().addOnPreDrawListener(mStartHeaderSlidingIn);
|
// visible.
|
||||||
|
if (!mQsExpanded) {
|
||||||
|
mHeaderAnimating = true;
|
||||||
|
getViewTreeObserver().addOnPreDrawListener(mStartHeaderSlidingIn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateHeaderSlidingOut() {
|
private void animateHeaderSlidingOut() {
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ public class StatusBarWindowView extends FrameLayout {
|
|||||||
if (mNotificationPanel.isFullyExpanded()
|
if (mNotificationPanel.isFullyExpanded()
|
||||||
&& mStackScrollLayout.getVisibility() == View.VISIBLE
|
&& mStackScrollLayout.getVisibility() == View.VISIBLE
|
||||||
&& mService.getBarState() == StatusBarState.KEYGUARD
|
&& mService.getBarState() == StatusBarState.KEYGUARD
|
||||||
&& !mService.isQsExpanded()
|
|
||||||
&& !mService.isBouncerShowing()) {
|
&& !mService.isBouncerShowing()) {
|
||||||
intercept = mDragDownHelper.onInterceptTouchEvent(ev);
|
intercept = mDragDownHelper.onInterceptTouchEvent(ev);
|
||||||
// wake up on a touch down event, if dozing
|
// wake up on a touch down event, if dozing
|
||||||
@@ -195,7 +194,7 @@ public class StatusBarWindowView extends FrameLayout {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onTouchEvent(MotionEvent ev) {
|
public boolean onTouchEvent(MotionEvent ev) {
|
||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
if (mService.getBarState() == StatusBarState.KEYGUARD && !mService.isQsExpanded()) {
|
if (mService.getBarState() == StatusBarState.KEYGUARD) {
|
||||||
handled = mDragDownHelper.onTouchEvent(ev);
|
handled = mDragDownHelper.onTouchEvent(ev);
|
||||||
}
|
}
|
||||||
if (!handled) {
|
if (!handled) {
|
||||||
|
|||||||
@@ -812,8 +812,7 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
}
|
}
|
||||||
handleEmptySpaceClick(ev);
|
handleEmptySpaceClick(ev);
|
||||||
boolean expandWantsIt = false;
|
boolean expandWantsIt = false;
|
||||||
if (mIsExpanded && !mSwipingInProgress && !mOnlyScrollingInThisMotion
|
if (mIsExpanded && !mSwipingInProgress && !mOnlyScrollingInThisMotion) {
|
||||||
&& isScrollingEnabled()) {
|
|
||||||
if (isCancelOrUp) {
|
if (isCancelOrUp) {
|
||||||
mExpandHelper.onlyObserveMovements(false);
|
mExpandHelper.onlyObserveMovements(false);
|
||||||
}
|
}
|
||||||
@@ -1567,7 +1566,7 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
initDownStates(ev);
|
initDownStates(ev);
|
||||||
handleEmptySpaceClick(ev);
|
handleEmptySpaceClick(ev);
|
||||||
boolean expandWantsIt = false;
|
boolean expandWantsIt = false;
|
||||||
if (!mSwipingInProgress && !mOnlyScrollingInThisMotion && isScrollingEnabled()) {
|
if (!mSwipingInProgress && !mOnlyScrollingInThisMotion) {
|
||||||
expandWantsIt = mExpandHelper.onInterceptTouchEvent(ev);
|
expandWantsIt = mExpandHelper.onInterceptTouchEvent(ev);
|
||||||
}
|
}
|
||||||
boolean scrollWantsIt = false;
|
boolean scrollWantsIt = false;
|
||||||
@@ -2268,11 +2267,11 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
private void updateScrollPositionOnExpandInBottom(ExpandableView view) {
|
private void updateScrollPositionOnExpandInBottom(ExpandableView view) {
|
||||||
if (view instanceof ExpandableNotificationRow) {
|
if (view instanceof ExpandableNotificationRow) {
|
||||||
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
||||||
if (row.isUserLocked()) {
|
if (row.isUserLocked() && row != getFirstChildNotGone()) {
|
||||||
// We are actually expanding this view
|
// We are actually expanding this view
|
||||||
float endPosition = row.getTranslationY() + row.getActualHeight();
|
float endPosition = row.getTranslationY() + row.getActualHeight();
|
||||||
int stackEnd = mMaxLayoutHeight - mBottomStackPeekSize -
|
int stackEnd = mMaxLayoutHeight - mBottomStackPeekSize -
|
||||||
mBottomStackSlowDownHeight;
|
mBottomStackSlowDownHeight + (int) mStackTranslation;
|
||||||
if (endPosition > stackEnd) {
|
if (endPosition > stackEnd) {
|
||||||
mOwnScrollY += endPosition - stackEnd;
|
mOwnScrollY += endPosition - stackEnd;
|
||||||
mDisallowScrollingInThisMotion = true;
|
mDisallowScrollingInThisMotion = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user