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

Commit 80bfd9c8 authored by Matt Pietal's avatar Matt Pietal
Browse files

Fix some broken tests

Specific to the new occluded flag

Fixes: 356448227
Test: atest KeyguardViewMediatorTest
Flag: com.android.systemui.use_transitions_for_keyguard_occluded
Change-Id: Id62e35eff6521cb1e94b6861c298986994c449b7
parent 688f9d71
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.res.R;
import com.android.systemui.scene.FakeWindowRootViewComponent;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ui.viewmodel.NotificationShadeWindowModel;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.phone.DozeParameters;
@@ -107,7 +106,6 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {
    @Mock private ShadeWindowLogger mShadeWindowLogger;
    @Mock private SelectedUserInteractor mSelectedUserInteractor;
    @Mock private UserTracker mUserTracker;
    @Mock private NotificationShadeWindowModel mNotificationShadeWindowModel;
    @Captor private ArgumentCaptor<WindowManager.LayoutParams> mLayoutParameters;
    @Captor private ArgumentCaptor<StatusBarStateController.StateListener> mStateListener;

@@ -163,7 +161,7 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {
                mShadeWindowLogger,
                () -> mSelectedUserInteractor,
                mUserTracker,
                mNotificationShadeWindowModel,
                mKosmos.getNotificationShadeWindowModel(),
                mKosmos::getCommunalInteractor) {
                    @Override
                    protected boolean isDebuggable() {
+1 −3
Original line number Diff line number Diff line
@@ -111,7 +111,6 @@ import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.shade.ShadeWindowLogger;
import com.android.systemui.shade.domain.interactor.ShadeInteractor;
import com.android.systemui.shade.ui.viewmodel.NotificationShadeWindowModel;
import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
@@ -226,7 +225,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
    private @Mock DreamViewModel mDreamViewModel;
    private @Mock CommunalTransitionViewModel mCommunalTransitionViewModel;
    private @Mock SystemPropertiesHelper mSystemPropertiesHelper;
    @Mock private NotificationShadeWindowModel mNotificationShadeWindowModel;

    private FakeFeatureFlags mFeatureFlags;
    private final int mDefaultUserId = 100;
@@ -274,7 +272,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
                mShadeWindowLogger,
                () -> mSelectedUserInteractor,
                mUserTracker,
                mNotificationShadeWindowModel,
                mKosmos.getNotificationShadeWindowModel(),
                mKosmos::getCommunalInteractor);
        mFeatureFlags = new FakeFeatureFlags();
        mSetFlagsRule.enableFlags(FLAG_REFACTOR_GET_CURRENT_USER);
+2 −1
Original line number Diff line number Diff line
@@ -349,10 +349,10 @@ public class BubblesTest extends SysuiTestCase {
    private Display mDefaultDisplay;
    @Mock
    private Lazy<ViewCapture> mLazyViewCapture;
    @Mock private NotificationShadeWindowModel mNotificationShadeWindowModel;

    private final KosmosJavaAdapter mKosmos = new KosmosJavaAdapter(this);
    private ShadeInteractor mShadeInteractor;
    private NotificationShadeWindowModel mNotificationShadeWindowModel;
    private ShellTaskOrganizer mShellTaskOrganizer;
    private TaskViewTransitions mTaskViewTransitions;

@@ -411,6 +411,7 @@ public class BubblesTest extends SysuiTestCase {
        when(deviceEntryUdfpsInteractor.isUdfpsSupported()).thenReturn(MutableStateFlow(false));

        mShadeInteractor = mKosmos.getShadeInteractor();
        mNotificationShadeWindowModel = mKosmos.getNotificationShadeWindowModel();

        mNotificationShadeWindowController = new NotificationShadeWindowControllerImpl(
                mContext,
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.systemui.settings.brightness.domain.interactor.brightnessMirr
import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.shade.shadeController
import com.android.systemui.shade.ui.viewmodel.notificationShadeWindowModel
import com.android.systemui.statusbar.chips.ui.viewmodel.ongoingActivityChipsViewModel
import com.android.systemui.statusbar.notification.domain.interactor.seenNotificationsInteractor
import com.android.systemui.statusbar.notification.stack.domain.interactor.headsUpNotificationInteractor
@@ -140,6 +141,7 @@ class KosmosJavaAdapter() {
    val shadeController by lazy { kosmos.shadeController }
    val shadeRepository by lazy { kosmos.shadeRepository }
    val shadeInteractor by lazy { kosmos.shadeInteractor }
    val notificationShadeWindowModel by lazy { kosmos.notificationShadeWindowModel }
    val wifiInteractor by lazy { kosmos.wifiInteractor }
    val fakeWifiRepository by lazy { kosmos.fakeWifiRepository }
    val volumeDialogInteractor by lazy { kosmos.volumeDialogInteractor }