Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dcd691c authored by Selim Cinek's avatar Selim Cinek Committed by Android Git Automerger
Browse files

am cb9400aa: Enabled expansion and dragging down when QS is expanded

* commit 'cb9400aa':
  Enabled expansion and dragging down when QS is expanded
parents c7f063f6 cb9400aa
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1075,9 +1075,13 @@ public class NotificationPanelView extends PanelView implements
    };

    private void animateHeaderSlidingIn() {
        // 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() {
        mHeaderAnimating = true;
+1 −2
Original line number Diff line number Diff line
@@ -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) {
+4 −5
Original line number Diff line number Diff line
@@ -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;