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

Commit b57c3765 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed the positioning of the media panel after reinflation" into...

Merge "Fixed the positioning of the media panel after reinflation" into rvc-dev am: 604e9592 am: e3dde8ac

Change-Id: I8403f8cd5942f956e2bad58564b2762e238ed68c
parents 31e6e90e e3dde8ac
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
    private int mState;
    private QSContainerImplController mQSContainerImplController;
    private int[] mTmpLocation = new int[2];
    private int mLastViewHeight;
    private float mLastHeaderTranslation;

    @Inject
    public QSFragment(RemoteInputQuickSettingsDisabler remoteInputQsDisabler,
@@ -148,6 +150,13 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
        setHost(mHost);
        mStatusBarStateController.addCallback(this);
        onStateChanged(mStatusBarStateController.getState());
        view.addOnLayoutChangeListener(
                (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
                    boolean sizeChanged = (oldTop - oldBottom) != (top - bottom);
                    if (sizeChanged) {
                        setQsExpansion(mLastQSExpansion, mLastQSExpansion);
                    }
                });
    }

    @Override
@@ -374,11 +383,15 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
                            ? translationScaleY * mHeader.getHeight()
                            : headerTranslation);
        }
        if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded) {
        int currentHeight = getView().getHeight();
        mLastHeaderTranslation = headerTranslation;
        if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded
                && mLastViewHeight == currentHeight) {
            return;
        }
        mLastQSExpansion = expansion;
        mLastKeyguardAndExpanded = onKeyguardAndExpanded;
        mLastViewHeight = currentHeight;

        boolean fullyExpanded = expansion == 1;
        int heightDiff = mQSPanel.getBottom() - mHeader.getBottom() + mHeader.getPaddingBottom();