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

Commit 94f1bf7a authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 1b9560e2: am ce3f7931: am 6d54f81a: Merge "Preserve ResolverDrawerLayout...

am 1b9560e2: am ce3f7931: am 6d54f81a: Merge "Preserve ResolverDrawerLayout fully collapsed state across relayout" into mnc-dev

* commit '1b9560e2':
  Preserve ResolverDrawerLayout fully collapsed state across relayout
parents 6a131fee 1b9560e2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -661,13 +661,20 @@ public class ResolverDrawerLayout extends ViewGroup {
            }
        }

        final int oldCollapsibleHeight = mCollapsibleHeight;
        mCollapsibleHeight = Math.max(0,
                heightUsed - alwaysShowHeight - getMaxCollapsedHeight());
        mUncollapsibleHeight = heightUsed - mCollapsibleHeight;

        if (isLaidOut()) {
            final boolean isCollapsedOld = mCollapseOffset != 0;
            if (oldCollapsibleHeight < mCollapsibleHeight
                    && mCollapseOffset == oldCollapsibleHeight) {
                // Stay closed even at the new height.
                mCollapseOffset = mCollapsibleHeight;
            } else {
                mCollapseOffset = Math.min(mCollapseOffset, mCollapsibleHeight);
            }
            final boolean isCollapsedNew = mCollapseOffset != 0;
            if (isCollapsedOld != isCollapsedNew) {
                notifyViewAccessibilityStateChangedIfNeeded(