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

Commit 10db7c7e authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Consistently log back gesture origin

Bug: 127848641
Test: builds, manually verified

TL;DR;; the unhandled back gesture direction was opposite of handled
back gesture.

Change-Id: I828543bc86e6fbb24d1a6ee5d6b5b92118401323
parent 7feb1a1f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -292,12 +292,12 @@ public class EdgeBackGestureHandler implements DisplayListener {
            // Verify if this is in within the touch region and we aren't in immersive mode, and
            // Verify if this is in within the touch region and we aren't in immersive mode, and
            // either the bouncer is showing or the notification panel is hidden
            // either the bouncer is showing or the notification panel is hidden
            int stateFlags = mOverviewProxyService.getSystemUiStateFlags();
            int stateFlags = mOverviewProxyService.getSystemUiStateFlags();
            mIsOnLeftEdge = ev.getX() < mEdgeWidth;
            mAllowGesture = (stateFlags & SYSUI_STATE_NAV_BAR_HIDDEN) == 0
            mAllowGesture = (stateFlags & SYSUI_STATE_NAV_BAR_HIDDEN) == 0
                    && ((stateFlags & SYSUI_STATE_BOUNCER_SHOWING) == SYSUI_STATE_BOUNCER_SHOWING
                    && ((stateFlags & SYSUI_STATE_BOUNCER_SHOWING) == SYSUI_STATE_BOUNCER_SHOWING
                            || (stateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) == 0)
                            || (stateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) == 0)
                    && isWithinTouchRegion((int) ev.getX(), (int) ev.getY());
                    && isWithinTouchRegion((int) ev.getX(), (int) ev.getY());
            if (mAllowGesture) {
            if (mAllowGesture) {
                mIsOnLeftEdge = ev.getX() < mEdgeWidth;
                mEdgePanelLp.gravity = mIsOnLeftEdge
                mEdgePanelLp.gravity = mIsOnLeftEdge
                        ? (Gravity.LEFT | Gravity.TOP)
                        ? (Gravity.LEFT | Gravity.TOP)
                        : (Gravity.RIGHT | Gravity.TOP);
                        : (Gravity.RIGHT | Gravity.TOP);