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

Commit 564dc924 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

overscroll: Don't overshoot unless the item is an explicit scrollable list

In other words... No scrollbars, no overscroll for you.

Change-Id: I28bcd11151c323091d6447643341a7330dc913db
parent f8629697
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -8844,9 +8844,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
     * @return This view's overscroll mode.
     */
    public int getOverscrollMode() {
        /* User explicit disable */
        if (Settings.System.getInt(mContext.getContentResolver(), 
                    Settings.System.ALLOW_OVERSCROLL, 0) <= 0)
            return OVERSCROLL_NEVER;
        /* Don't overscroll items without scrollbars */
        else if ((mViewFlags & SCROLLBARS_VERTICAL) == 0 && (mViewFlags & SCROLLBARS_HORIZONTAL) == 0)
            return OVERSCROLL_NEVER;

        return mOverscrollMode;
    }