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

Commit f9347af4 authored by Justin Weir's avatar Justin Weir
Browse files

Ensure QuickSettingsControllerImpl is off when scenes are on

Adds an assertion that the scene container flag is off to the
QuickSettingsControllerImpl constructor. Also moves the equivalent
assertion in NPVC to the top of its constructor. Also deprecates the
last dead method in ShadeViewController. At this point, there are
still two methods left in ShadeViewController, but because all calls to
them are very likely to be flagged off, we now consider b/303267342
complete.

Fixes: 303267342
Test: Manually verified that a phone with scenes enabled boots
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT
Change-Id: I8a66cd232edab0c60aebd1af064c99b7edf3ad3e
parent 065e8c4a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -96,12 +96,12 @@ import com.android.internal.policy.SystemBarUtils;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.ActiveUnlockConfig;
import com.android.keyguard.LockIconViewController;
import com.android.keyguard.KeyguardClockSwitch.ClockSize;
import com.android.keyguard.KeyguardStatusView;
import com.android.keyguard.KeyguardStatusViewController;
import com.android.keyguard.KeyguardUnfoldTransition;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.LockIconViewController;
import com.android.keyguard.dagger.KeyguardQsUserSwitchComponent;
import com.android.keyguard.dagger.KeyguardStatusBarViewComponent;
import com.android.keyguard.dagger.KeyguardStatusViewComponent;
@@ -772,6 +772,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            PowerInteractor powerInteractor,
            KeyguardClockPositionAlgorithm keyguardClockPositionAlgorithm,
            NaturalScrollingSettingObserver naturalScrollingSettingObserver) {
        SceneContainerFlag.assertInLegacyMode();
        keyguardStateController.addCallback(new KeyguardStateController.Callback() {
            @Override
            public void onKeyguardFadingAwayChanged() {
@@ -982,7 +983,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                });
        mAlternateBouncerInteractor = alternateBouncerInteractor;
        dumpManager.registerDumpable(this);
        SceneContainerFlag.assertInLegacyMode();
    }

    private void unlockAnimationFinished() {
+1 −0
Original line number Diff line number Diff line
@@ -336,6 +336,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
            SplitShadeStateController splitShadeStateController,
            Lazy<LargeScreenHeaderHelper> largeScreenHeaderHelperLazy
    ) {
        SceneContainerFlag.assertInLegacyMode();
        mPanelViewControllerLazy = panelViewControllerLazy;
        mPanelView = panelView;
        mLargeScreenHeaderHelperLazy = largeScreenHeaderHelperLazy;
+2 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ interface ShadeViewController {
    fun setQsScrimEnabled(qsScrimEnabled: Boolean)

    /** Sets the top spacing for the ambient indicator. */
    @Deprecated("Does nothing when scene container is enabled.")
    fun setAmbientIndicationTop(ambientIndicationTop: Int, ambientTextVisible: Boolean)

    /** Updates notification panel-specific flags on [SysUiState]. */
@@ -71,6 +72,7 @@ interface ShadeViewController {
     */
    fun handleExternalTouch(event: MotionEvent): Boolean

    /** Sends an external (e.g. Status Bar) intercept touch event to the Shade touch handler. */
    fun handleExternalInterceptTouch(event: MotionEvent): Boolean

    /**