Skip to content

Commit 841594b

Browse files
committed
Fix jump cut when dismissing items in Recents
(fixing horizontal scroll view in this CL... whoops). Bug: 7070897 Change-Id: I3a63799ce7f3d9a50869755ee3289e641fa82fa4
1 parent 30ed33b commit 841594b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ public boolean onLongClick(View v) {
156156
}
157157
setLayoutTransition(transitioner);
158158

159-
// Scroll to end after layout.
160-
final ViewTreeObserver observer = getViewTreeObserver();
159+
// Scroll to end after initial layout.
161160

162161
final OnGlobalLayoutListener updateScroll = new OnGlobalLayoutListener() {
163162
public void onGlobalLayout() {
164163
mLastScrollPosition = scrollPositionOfMostRecent();
165164
scrollTo(mLastScrollPosition, 0);
165+
final ViewTreeObserver observer = getViewTreeObserver();
166166
if (observer.isAlive()) {
167167
observer.removeOnGlobalLayoutListener(this);
168168
}
169169
}
170170
};
171-
observer.addOnGlobalLayoutListener(updateScroll);
171+
getViewTreeObserver().addOnGlobalLayoutListener(updateScroll);
172172
}
173173

174174
@Override

0 commit comments

Comments
 (0)