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

Commit 2ef336ec authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "Fix some broken tests" into main

parents b4ddeb0e 80bfd9c8
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line 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.res.R;
import com.android.systemui.scene.FakeWindowRootViewComponent;
import com.android.systemui.scene.FakeWindowRootViewComponent;
import com.android.systemui.settings.UserTracker;
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.StatusBarState;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.phone.DozeParameters;
import com.android.systemui.statusbar.phone.DozeParameters;
@@ -107,7 +106,6 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {
    @Mock private ShadeWindowLogger mShadeWindowLogger;
    @Mock private ShadeWindowLogger mShadeWindowLogger;
    @Mock private SelectedUserInteractor mSelectedUserInteractor;
    @Mock private SelectedUserInteractor mSelectedUserInteractor;
    @Mock private UserTracker mUserTracker;
    @Mock private UserTracker mUserTracker;
    @Mock private NotificationShadeWindowModel mNotificationShadeWindowModel;
    @Captor private ArgumentCaptor<WindowManager.LayoutParams> mLayoutParameters;
    @Captor private ArgumentCaptor<WindowManager.LayoutParams> mLayoutParameters;
    @Captor private ArgumentCaptor<StatusBarStateController.StateListener> mStateListener;
    @Captor private ArgumentCaptor<StatusBarStateController.StateListener> mStateListener;


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


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


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


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


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


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