commit | 757c697f73561ef4cfae9e3da64e9b2894d24147 | [log] [tgz] |
---|---|---|
author | Mark Brophy <mbrophy@google.com> | Tue Oct 25 17:01:28 2011 +0100 |
committer | Mark Brophy <mbrophy@google.com> | Tue Oct 25 17:01:28 2011 +0100 |
tree | 23745ca9443f57de8235498e4183bee421ec8dfe | |
parent | 2536b1d627c0296531a91dc519ee8d84ed505291 [diff] [blame] |
Fix scroll listeners lost in ViewTreeObserver. Bug: 5512156 Change-Id: I4bb7ccab39053ae75a4bef9309ab334a4ccecf51
diff --git a/core/java/android/view/ViewTreeObserver.java b/core/java/android/view/ViewTreeObserver.java index db87175..c53fc6b 100644 --- a/core/java/android/view/ViewTreeObserver.java +++ b/core/java/android/view/ViewTreeObserver.java
@@ -288,6 +288,14 @@ } } + if (observer.mOnScrollChangedListeners != null) { + if (mOnScrollChangedListeners != null) { + mOnScrollChangedListeners.addAll(observer.mOnScrollChangedListeners); + } else { + mOnScrollChangedListeners = observer.mOnScrollChangedListeners; + } + } + observer.kill(); }