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

Commit f0955ac7 authored by Louis Pullen-Freilich's avatar Louis Pullen-Freilich
Browse files

Adds FlingRunnable to dark-greylist

To stop a scroll early, developers should instead use AbsListView#smoothScrollBy(0,0)
To start a specific fling, developers should instead use AbsListView#fling(int)
For any further customization, developers should migrate to using
and customizing RecyclerView

Bug: b/123769448
Bug: b/123769453
Bug: b/123769380
Test: n/a
Change-Id: I08a773c3fa70270ddc9f4e36dcbc64c64f7336de
parent e8c4958b
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -442,8 +442,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

    /**
     * Handles one frame of a fling
     *
     * To interrupt a fling early you should use smoothScrollBy(0,0) instead
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    private FlingRunnable mFlingRunnable;

    /**
@@ -4688,7 +4690,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            mScroller = new OverScroller(getContext());
        }

        @UnsupportedAppUsage
        // Use AbsListView#fling(int) instead
        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
        void start(int initialVelocity) {
            int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0;
            mLastFlingY = initialY;
@@ -4766,7 +4769,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            postOnAnimation(this);
        }

        @UnsupportedAppUsage
        // To interrupt a fling early you should use smoothScrollBy(0,0) instead
        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
        void endFling() {
            mTouchMode = TOUCH_MODE_REST;