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

Commit 2fb4971f authored by Daniel Akinola's avatar Daniel Akinola
Browse files

Fix onStatusBarTouchEvent_withoutSceneFlag_onSameDisplayTouch_handlesInput

Test was failing on specific builds due to a HSUM issue. The userId didn't match the calling id in the test, which stopped the expected method from being called. Fix is to just mock the user Id to always match the calling user Id.

Bug: 362719719
Bug: 417734966
Bug: 419057255
Test: LauncherProxyServiceTest
Flag: com.android.systemui.shade_window_goes_around
Change-Id: Icb8bb772316fd80eb6ce6056664d4cb37c265a29
parent 407e873e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.ComponentName
import android.content.Context
import android.content.pm.PackageManager
import android.content.pm.ResolveInfo
import android.os.Binder
import android.os.PowerManager
import android.os.UserManager
import android.platform.test.annotations.DisableFlags
@@ -412,6 +413,7 @@ class LauncherProxyServiceTest : SysuiTestCase() {
    @DisableFlags(Flags.FLAG_SCENE_CONTAINER, Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
    fun onStatusBarTouchEvent_withoutSceneFlag_onSameDisplayTouch_handlesInput() =
        kosmos.testScope.runTest {
            whenever(userTracker.userId).thenReturn(Binder.getCallingUserHandle().identifier)
            val shadeDisplayId = 0
            whenever(statusBarShadeDisplayPolicy.displayId)
                .thenReturn(MutableStateFlow(shadeDisplayId))