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

Commit 7b313c3d authored by Andre Le's avatar Andre Le
Browse files

Flexiglass: Fix StatusBarRemoteInputCallbackTest when flexi is enabled

During setUp(), we need to mock mDeviceUnlockedInteractorLazy and
mSceneInteractorLazy to make sure the under test object is constructed
correctly.

Bug: 416715566
Test: StatusBarRemoteInputCallbackTest
Flag: TEST_ONLY
Change-Id: Ide74386201e47b8e7f25a5e25536a48beb954148
parent 679115af
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.deviceentry.domain.interactor.DeviceUnlockedInteractor;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.scene.domain.interactor.SceneInteractor;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.settings.FakeDisplayTracker;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.statusbar.ActionClickLogger;
@@ -98,6 +99,11 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {
        mDependency.injectTestDependency(NotificationLockscreenUserManager.class,
                mNotificationLockscreenUserManager);

        if (SceneContainerFlag.isEnabled()) {
            when(mDeviceUnlockedInteractorLazy.get()).thenReturn(mDeviceUnlockedInteractor);
            when(mSceneInteractorLazy.get()).thenReturn(mSceneInteractor);
        }

        mRemoteInputCallback = spy(new StatusBarRemoteInputCallback(mContext,
                mGroupExpansionManager, mNotificationLockscreenUserManager,
                mKeyguardStateController, mStatusBarStateController, mStatusBarKeyguardViewManager,