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

Commit a7c13cee authored by Antoan Angelov's avatar Antoan Angelov Committed by Automerger Merge Worker
Browse files

Merge "Disable side swiping on RTL languages" into rvc-dev am: 46b4296b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11880480

Change-Id: I41be3c664315f158f455857d5baff5a24c43ec27
parents 0f629dad 46b4296b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -74,12 +74,16 @@ public class ResolverViewPager extends ViewPager {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    /**
     * Sets whether swiping sideways should happen.
     * <p>Note that swiping is always disabled for RTL layouts (b/159110029 for context).
     */
    void setSwipingEnabled(boolean swipingEnabled) {
        mSwipingEnabled = swipingEnabled;
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return mSwipingEnabled && super.onInterceptTouchEvent(ev);
        return !isLayoutRtl() && mSwipingEnabled && super.onInterceptTouchEvent(ev);
    }
}