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

Commit 4dc2c2f1 authored by Chris Göllner's avatar Chris Göllner Committed by Chris Göllner
Browse files

PerDisplayStore: remove CoreStartable implementation

The CoreStartable implementation was there to start listening for
display removals, and clean up the cache when a display was removed.

This can also be done dynamically when `forDisplay` is called. The
benefit is that this new approach removes a lot of unneeded code,
including the dagger bindings.

Test: atest SystemUITests
Bug: 362720336
Flag: com.android.systemui.status_bar_connected_displays
Change-Id: If538c615157ec44f7868038ff89fc80d5b867360
parent 3a254cf0
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -42,11 +42,6 @@ class PerDisplayStoreImplTest : SysuiTestCase() {

    private val store = kosmos.fakePerDisplayStore

    @Before
    fun start() {
        store.start()
    }

    @Before
    fun addDisplays() = runBlocking {
        fakeDisplayRepository.addDisplay(createDisplay(DEFAULT_DISPLAY_ID))
+0 −5
Original line number Diff line number Diff line
@@ -41,11 +41,6 @@ class LightBarControllerStoreImplTest : SysuiTestCase() {

    private val underTest = kosmos.lightBarControllerStoreImpl

    @Before
    fun start() {
        underTest.start()
    }

    @Before fun addDisplays() = runBlocking { fakeDisplayRepository.addDisplay(DEFAULT_DISPLAY) }

    @Test
+0 −5
Original line number Diff line number Diff line
@@ -46,11 +46,6 @@ class MultiDisplayDarkIconDispatcherStoreTest : SysuiTestCase() {
    // Lazy so that @EnableFlags has time to run before underTest is instantiated.
    private val underTest by lazy { kosmos.multiDisplayDarkIconDispatcherStore }

    @Before
    fun start() {
        underTest.start()
    }

    @Before fun addDisplays() = runBlocking { fakeDisplayRepository.addDisplay(DEFAULT_DISPLAY) }

    @Test
+0 −5
Original line number Diff line number Diff line
@@ -41,11 +41,6 @@ class MultiDisplayStatusBarContentInsetsProviderStoreTest : SysuiTestCase() {
    private val fakeDisplayRepository = kosmos.displayRepository
    private val underTest = kosmos.multiDisplayStatusBarContentInsetsProviderStore

    @Before
    fun start() {
        underTest.start()
    }

    @Before fun addDisplays() = runBlocking { fakeDisplayRepository.addDisplay(DEFAULT_DISPLAY) }

    @Test
+0 −5
Original line number Diff line number Diff line
@@ -43,11 +43,6 @@ class MultiDisplayStatusBarModeRepositoryStoreTest : SysuiTestCase() {
    private val fakeDisplayRepository = kosmos.displayRepository
    private val underTest by lazy { kosmos.multiDisplayStatusBarModeRepositoryStore }

    @Before
    fun start() {
        underTest.start()
    }

    @Before fun addDisplays() = runBlocking { fakeDisplayRepository.addDisplay(DEFAULT_DISPLAY) }

    @Test
Loading