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

Commit 429bbf64 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Prevent setting expansion height to the current value" into main

parents 526f0030 d7d452b8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -789,6 +789,9 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum

    /** update Qs height state */
    void setExpansionHeight(float height) {
        if (mExpansionHeight == height) {
            return;
        }
        int maxHeight = getMaxExpansionHeight();
        height = Math.min(Math.max(
                height, getMinExpansionHeight()), maxHeight);
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public class QuickSettingsControllerImplTest extends QuickSettingsControllerImpl
    public void testCloseQsSideEffects() {
        enableSplitShade(true);
        mQsController.setExpandImmediate(true);
        mQsController.setExpanded(true);
        mQsController.setExpansionHeight(800);
        mQsController.closeQs();

        assertThat(mQsController.getExpanded()).isEqualTo(false);