diff options
| author | Alan Viverette <alanv@google.com> | 2015-06-03 10:35:44 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2015-06-03 10:35:44 -0700 |
| commit | 6c413ce6382d083c0f34fb9c8f5220e1cf467650 (patch) | |
| tree | 4176e1f04ffc69cea97a9c2f00d8247eba615c1c /core/java/android | |
| parent | 5431000830551959db15038da8f057c2e993d01a (diff) | |
Call dispatchFinishTemporaryDetach before returning a transient view
ListView caches transient state views for reuse during layout, which calls
dispatchStartTemporaryDetach() before caching the view. This should always
be followed by a corresponding dispatchFinishTemporaryDetach() before
removing the view from the cache and returning it for reuse. While this
was the case for other types of cached views, we missed this call for
views placed in one of the two transient view caches.
Bug: 17387206
Change-Id: I360945006558b2783c098183a7cc9bc28d05d9ab
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/widget/AbsListView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index a3332fa21f2c..a0d19300e869 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2345,8 +2345,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } } - // Scrap view implies temporary detachment. isScrap[0] = true; + + // Finish the temporary detach started in addScrapView(). + transientView.dispatchFinishTemporaryDetach(); return transientView; } @@ -2359,6 +2361,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } else { isScrap[0] = true; + // Finish the temporary detach started in addScrapView(). child.dispatchFinishTemporaryDetach(); } } |
