diff options
author | Selim Cinek <cinek@google.com> | 2014-04-28 20:23:30 +0200 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2014-04-28 20:27:32 +0200 |
commit | 2ba5f1f4e328dc2da47363a9feda75d5fdb9a4af (patch) | |
tree | 018ee25c54ddd518deac2e680857eab0eb7e6e7b /packages/SystemUI/src/com | |
parent | c955677c1b2e03ad048e034bd033dd66dfd72ef3 (diff) | |
download | frameworks_base-2ba5f1f4e328dc2da47363a9feda75d5fdb9a4af.zip frameworks_base-2ba5f1f4e328dc2da47363a9feda75d5fdb9a4af.tar.gz frameworks_base-2ba5f1f4e328dc2da47363a9feda75d5fdb9a4af.tar.bz2 |
Fixed race condition regarding first child max height
The scroller could crash due to a race condition when updating
the maxheight of the first view.
Bug: 14295010
Change-Id: I911c724a26c8624e2326118e3b392ee675001bc6
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index d9e7f66..8757d57 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -542,9 +542,13 @@ public class StackScrollAlgorithm { public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { - mFirstChildMaxHeight = getMaxAllowedChildHeight( - mFirstChildWhileExpanding); - mFirstChildWhileExpanding.removeOnLayoutChangeListener(this); + if (mFirstChildWhileExpanding != null) { + mFirstChildMaxHeight = getMaxAllowedChildHeight( + mFirstChildWhileExpanding); + } else { + mFirstChildMaxHeight = 0; + } + v.removeOnLayoutChangeListener(this); } }); } else { |