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

Commit 1ca35418 authored by Xiyuan Xia's avatar Xiyuan Xia Committed by Android (Google) Code Review
Browse files

Merge "Abort swipe up gesture when long press is detected" into mnc-dev

parents c4ddf16c ee7dd056
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -105,6 +105,13 @@ public class DelegateViewHelper {
        return mPanelShowing;
    }

    public void abortCurrentGesture() {
        if (mStarted) {
            mStarted = false;
            mBar.setInteracting(StatusBarManager.WINDOW_NAVIGATION_BAR, false);
        }
    }

    public void setSourceView(View view) {
        mSourceView = view;
        if (mSourceView != null) {
+5 −0
Original line number Diff line number Diff line
@@ -245,6 +245,11 @@ public class NavigationBarView extends LinearLayout {
        return intercept;
    }

    public void abortCurrentGesture() {
        mDelegateHelper.abortCurrentGesture();
        getHomeButton().abortCurrentGesture();
    }

    private H mHandler = new H();

    public View getCurrentView() {
+1 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            invokeAssistGesture(true /* vibrate */);
            awakenDreams();
            if (mNavigationBarView != null) {
                mNavigationBarView.getHomeButton().abortCurrentGesture();
                mNavigationBarView.abortCurrentGesture();
            }
        }
    };