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

Commit dc282b72 authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "Null guard QuickSettingsController#disallowTouches" into main

parents 6126f188 dd7a7649
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -736,7 +736,11 @@ public class QuickSettingsController implements Dumpable {

    /** Returns whether touches from the notification panel should be disallowed */
    public boolean disallowTouches() {
        if (mQs != null) {
            return mQs.disallowPanelTouches();
        } else {
            return false;
        }
    }

    void setListening(boolean listening) {
+6 −0
Original line number Diff line number Diff line
@@ -398,6 +398,12 @@ public class QuickSettingsControllerTest extends QuickSettingsControllerBaseTest
                .isEqualTo(mQsController.getScrimCornerRadius());
    }

    @Test
    public void disallowTouches_nullQs_false() {
        mQsController.setQs(null);
        assertThat(mQsController.disallowTouches()).isFalse();
    }

    private void lockScreen() {
        mQsController.setBarState(KEYGUARD);
    }