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

Commit 1fb1192d authored by Justin Weir's avatar Justin Weir
Browse files

Remove getShadeViewController calls

Bug: 288868098
Test: updated and ran affected test
Change-Id: Ibd10284d5821be5d29431cd08fbeebca06e1c212
parent 2e4f6656
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import com.android.systemui.recents.Recents;
import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.CentralSurfaces;
@@ -188,6 +189,7 @@ public class SystemActions implements CoreStartable {
    private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
    private final NotificationShadeWindowController mNotificationShadeController;
    private final ShadeController mShadeController;
    private final Lazy<ShadeViewController> mShadeViewController;
    private final StatusBarWindowCallback mNotificationShadeCallback;
    private boolean mDismissNotificationShadeActionRegistered;

@@ -196,12 +198,14 @@ public class SystemActions implements CoreStartable {
            UserTracker userTracker,
            NotificationShadeWindowController notificationShadeController,
            ShadeController shadeController,
            Lazy<ShadeViewController> shadeViewController,
            Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
            Optional<Recents> recentsOptional,
            DisplayTracker displayTracker) {
        mContext = context;
        mUserTracker = userTracker;
        mShadeController = shadeController;
        mShadeViewController = shadeViewController;
        mRecentsOptional = recentsOptional;
        mDisplayTracker = displayTracker;
        mReceiver = new SystemActionsBroadcastReceiver();
@@ -330,8 +334,7 @@ public class SystemActions implements CoreStartable {
        final Optional<CentralSurfaces> centralSurfacesOptional =
                mCentralSurfacesOptionalLazy.get();
        if (centralSurfacesOptional.isPresent()
                && centralSurfacesOptional.get().getShadeViewController() != null
                && centralSurfacesOptional.get().getShadeViewController().isPanelExpanded()
                && mShadeViewController.get().isPanelExpanded()
                && !centralSurfacesOptional.get().isKeyguardShowing()) {
            if (!mDismissNotificationShadeActionRegistered) {
                mA11yManager.registerSystemAction(
+5 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.systemui.recents.Recents;
import com.android.systemui.settings.FakeDisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.CentralSurfaces;

@@ -65,6 +66,8 @@ public class SystemActionsTest extends SysuiTestCase {
    @Mock
    private ShadeController mShadeController;
    @Mock
    private ShadeViewController mShadeViewController;
    @Mock
    private Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
    @Mock
    private Optional<Recents> mRecentsOptional;
@@ -82,7 +85,8 @@ public class SystemActionsTest extends SysuiTestCase {
        mContext.addMockSystemService(TelecomManager.class, mTelecomManager);
        mContext.addMockSystemService(InputManager.class, mInputManager);
        mSystemActions = new SystemActions(mContext, mUserTracker, mNotificationShadeController,
                mShadeController, mCentralSurfacesOptionalLazy, mRecentsOptional, mDisplayTracker);
                mShadeController, () -> mShadeViewController, mCentralSurfacesOptionalLazy,
                mRecentsOptional, mDisplayTracker);
    }

    @Test