From 5e9d94505bd7d4e294bfe309db25e293164e2d29 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 19 Nov 2010 12:03:22 -0800 Subject: [PATCH] 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 --- core/java/android/widget/AbsListView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index d38898587bf5c..a3e9bc9f33980 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -3018,6 +3018,11 @@ public abstract class AbsListView extends AdapterView 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 implements Te Debug.stopMethodTracing(); mFlingProfilingStarted = false; } - - if (mFlingStrictSpan != null) { - mFlingStrictSpan.finish(); - mFlingStrictSpan = null; - } } } }