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

Commit ee7dd056 authored by Xiyuan Xia's avatar Xiyuan Xia
Browse files

Abort swipe up gesture when long press is detected

When home button long press is detected, swipe up gesture on nav
bar should be aborted as well since both are targeted to start
assist.

Bug:20500672
Change-Id: Ifbc9a8f0692334c9764205e5ecfac47577ae03f6
parent 05fe90c1
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
@@ -1012,7 +1012,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            invokeAssistGesture(true /* vibrate */);
            awakenDreams();
            if (mNavigationBarView != null) {
                mNavigationBarView.getHomeButton().abortCurrentGesture();
                mNavigationBarView.abortCurrentGesture();
            }
        }
    };