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

Commit 5e9d9450 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

Fix AbsListView StrictMode.Span end point on flings.

Noticed after logs showed a ton of false positives, I went back and
looked at the history.  During the review of the previous CL, I
accidentally moved the finish() of the fling animation tracking inside
the PROFILE_FLINGING block, which is normally off.

Re-tested this CL with StrictMode debugging enabled and it now always
propertly resets to 0 animations in flight when no animations are
running.

Change-Id: Ie9746df36e2ec3f82679b20e91e3d93c05b863d4
parent de8da848
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -3018,6 +3018,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
            clearScrollingCache();
            mScroller.abortAnimation();

            if (mFlingStrictSpan != null) {
                mFlingStrictSpan.finish();
                mFlingStrictSpan = null;
            }
        }

        void flywheelTouch() {
@@ -3086,11 +3091,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                        Debug.stopMethodTracing();
                        mFlingProfilingStarted = false;
                    }

                    if (mFlingStrictSpan != null) {
                        mFlingStrictSpan.finish();
                        mFlingStrictSpan = null;
                    }
                }
            }
        }