Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ba5f1f4 authored by Selim Cinek's avatar Selim Cinek
Browse files

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
parent c955677c
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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) {
                                    if (mFirstChildWhileExpanding != null) {
                                        mFirstChildMaxHeight = getMaxAllowedChildHeight(
                                                mFirstChildWhileExpanding);
                                    mFirstChildWhileExpanding.removeOnLayoutChangeListener(this);
                                    } else {
                                        mFirstChildMaxHeight = 0;
                                    }
                                    v.removeOnLayoutChangeListener(this);
                                }
                            });
                } else {