File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/SystemUI/src/com/android/systemui/recent Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments