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

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

Delete CentralSurfaces.getShadeViewController

Fixes: 288868098
Test: updated and ran affected tests
Change-Id: Ic169e34e058abee5dd76aa0cb860c5f1965916a1
parent 59b2e81d
Loading
Loading
Loading
Loading
+9 −15
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.AssistUtils;
import com.android.internal.app.IVoiceInteractionSessionListener;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.ScreenDecorationsUtils;
import com.android.internal.util.ScreenshotHelper;
import com.android.internal.util.ScreenshotRequest;
import com.android.systemui.Dumpable;
@@ -143,6 +142,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
    private final Executor mMainExecutor;
    private final ShellInterface mShellInterface;
    private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
    private final Lazy<ShadeViewController> mShadeViewControllerLazy;
    private SysUiState mSysUiState;
    private final Handler mHandler;
    private final Lazy<NavigationBarController> mNavBarControllerLazy;
@@ -201,11 +201,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
                // TODO move this logic to message queue
                mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> {
                    if (event.getActionMasked() == ACTION_DOWN) {
                        ShadeViewController shadeViewController =
                                centralSurfaces.getShadeViewController();
                        if (shadeViewController != null) {
                            shadeViewController.startExpandLatencyTracking();
                        }
                        mShadeViewControllerLazy.get().startExpandLatencyTracking();
                    }
                    mHandler.post(() -> {
                        int action = event.getActionMasked();
@@ -552,8 +548,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            ShellInterface shellInterface,
            Lazy<NavigationBarController> navBarControllerLazy,
            Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
            Lazy<ShadeViewController> shadeViewControllerLazy,
            NavigationModeController navModeController,
            NotificationShadeWindowController statusBarWinController, SysUiState sysUiState,
            NotificationShadeWindowController statusBarWinController,
            SysUiState sysUiState,
            UserTracker userTracker,
            ScreenLifecycle screenLifecycle,
            WakefulnessLifecycle wakefulnessLifecycle,
@@ -573,6 +571,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        mMainExecutor = mainExecutor;
        mShellInterface = shellInterface;
        mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
        mShadeViewControllerLazy = shadeViewControllerLazy;
        mHandler = new Handler();
        mNavBarControllerLazy = navBarControllerLazy;
        mStatusBarWinController = statusBarWinController;
@@ -677,13 +676,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
                mNavBarControllerLazy.get().getDefaultNavigationBar();
        final NavigationBarView navBarView =
                mNavBarControllerLazy.get().getNavigationBarView(mContext.getDisplayId());
        final ShadeViewController panelController =
                mCentralSurfacesOptionalLazy.get()
                        .map(CentralSurfaces::getShadeViewController)
                        .orElse(null);
        if (SysUiState.DEBUG) {
            Log.d(TAG_OPS, "Updating sysui state flags: navBarFragment=" + navBarFragment
                    + " navBarView=" + navBarView + " panelController=" + panelController);
                    + " navBarView=" + navBarView
                    + " shadeViewController=" + mShadeViewControllerLazy.get());
        }

        if (navBarFragment != null) {
@@ -692,9 +688,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        if (navBarView != null) {
            navBarView.updateDisabledSystemUiStateFlags(mSysUiState);
        }
        if (panelController != null) {
            panelController.updateSystemUiStateFlags();
        }
        mShadeViewControllerLazy.get().updateSystemUiStateFlags();
        if (mStatusBarWinController != null) {
            mStatusBarWinController.notifyStateChangedCallbacks();
        }
+3 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.shade.ShadeViewController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
@@ -69,6 +70,7 @@ constructor(
    private val biometricUnlockControllerLazy: Lazy<BiometricUnlockController>,
    private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
    private val shadeControllerLazy: Lazy<ShadeController>,
    private val shadeViewControllerLazy: Lazy<ShadeViewController>,
    private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
    private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
    private val activityLaunchAnimator: ActivityLaunchAnimator,
@@ -896,7 +898,7 @@ constructor(
                if (dismissShade) {
                    return StatusBarLaunchAnimatorController(
                        animationController,
                        it.shadeViewController,
                        shadeViewControllerLazy.get(),
                        shadeControllerLazy.get(),
                        notifShadeWindowControllerLazy.get(),
                        isLaunchForActivity
+0 −4
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import com.android.systemui.display.data.repository.DisplayMetricsRepository;
import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.qs.QSPanelController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
@@ -195,9 +194,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
    @Override
    Lifecycle getLifecycle();

    /** */
    ShadeViewController getShadeViewController();

    /** Get the Keyguard Message Area that displays auth messages. */
    AuthKeyguardMessageArea getKeyguardMessageArea();

+1 −2
Original line number Diff line number Diff line
@@ -1677,8 +1677,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        Trace.endSection();
    }

    @Override
    public ShadeViewController getShadeViewController() {
    protected ShadeViewController getShadeViewController() {
        return mShadeSurface;
    }

+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.systemui.navigationbar.NavigationModeController
import com.android.systemui.recents.OverviewProxyService.ACTION_QUICKSTEP
import com.android.systemui.settings.FakeDisplayTracker
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeViewController
import com.android.systemui.shared.recents.IOverviewProxy
import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_WAKEFULNESS_MASK
import com.android.systemui.shared.system.QuickStepContract.WAKEFULNESS_ASLEEP
@@ -93,6 +94,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
    @Mock private lateinit var shellInterface: ShellInterface
    @Mock private lateinit var navBarController: NavigationBarController
    @Mock private lateinit var centralSurfaces: CentralSurfaces
    @Mock private lateinit var shadeViewController: ShadeViewController
    @Mock private lateinit var navModeController: NavigationModeController
    @Mock private lateinit var statusBarWinController: NotificationShadeWindowController
    @Mock private lateinit var userTracker: UserTracker
@@ -132,6 +134,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
                shellInterface,
                Lazy { navBarController },
                Lazy { Optional.of(centralSurfaces) },
                Lazy { shadeViewController },
                navModeController,
                statusBarWinController,
                sysUiState,
Loading