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

Commit 48230d07 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Avoid detecting WebView as TYPE_RECYCLING" into sc-dev am: 9093da88

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e94af103cd93c0185c5c7e434bee8ab9a1c7968
parents 07ef127c 9093da88
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -58,6 +58,11 @@ public class ScrollCaptureInternal {
     */
    public static final int TYPE_RECYCLING = 2;

    /**
     * The ViewGroup scrolls, but has no child views in
     */
    private static final int TYPE_OPAQUE = 3;

    /**
     * Performs tests on the given View and determines:
     * 1. If scrolling is possible
@@ -95,8 +100,15 @@ public class ScrollCaptureInternal {
            }
            return TYPE_RECYCLING;
        }
        // At least one child view is required.
        if (((ViewGroup) view).getChildCount() < 1) {
            if (DEBUG_VERBOSE) {
                Log.v(TAG, "scrollable with no children");
            }
            return TYPE_OPAQUE;
        }
        if (DEBUG_VERBOSE) {
            Log.v(TAG, "hint: less than two child views");
            Log.v(TAG, "hint: single child view");
        }
        //Because recycling containers don't use scrollY, a non-zero value means Scroll view.
        if (view.getScrollY() != 0) {