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

Commit c2bb120a authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Have recreateTaskbar perform recreate on UiThread.

Test: Taskbar{AllApps,Overlay}ControllerTest
Bug: 230027385
Flag: TEST_ONLY
Change-Id: I663e5ad7bb37e73381e2ef9d787c80177cfdf7a7
parent e7e98985
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -65,9 +65,8 @@ class TaskbarAllAppsControllerTest {
    }

    @Test
    @UiThreadTest
    fun testToggle_taskbarRecreated_allAppsReopened() {
        allAppsController.toggle()
        getInstrumentation().runOnMainSync { allAppsController.toggle() }
        taskbarUnitTestRule.recreateTaskbar()
        assertThat(allAppsController.isOpen).isTrue()
    }
+3 −2
Original line number Diff line number Diff line
@@ -150,9 +150,10 @@ class TaskbarOverlayControllerTest {
    }

    @Test
    @UiThreadTest
    fun testRecreateTaskbar_closesWindow() {
        getInstrumentation().runOnMainSync {
            TestOverlayView.show(overlayController.requestWindow())
        }
        taskbarUnitTestRule.recreateTaskbar()
        assertThat(hasOpenView(taskbarContext, TYPE_TASKBAR_OVERLAY_PROXY)).isFalse()
    }
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ class TaskbarUnitTestRule(private val testInstance: Any, private val context: Co

    /** Simulates Taskbar recreation lifecycle. */
    fun recreateTaskbar() {
        taskbarManager.recreateTaskbar()
        instrumentation.runOnMainSync { taskbarManager.recreateTaskbar() }
        injectControllers()
    }