summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt1
2 files changed, 1 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
index d3def315f131..c93b8e1a48f2 100644
--- a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
@@ -29,7 +29,6 @@ import com.android.app.tracing.FlowTracing.traceEach
import com.android.app.tracing.traceSection
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.display.data.DisplayEvent
import com.android.systemui.util.Compile
@@ -93,7 +92,6 @@ class DisplayRepositoryImpl
constructor(
private val displayManager: DisplayManager,
@Background backgroundHandler: Handler,
- @Application applicationScope: CoroutineScope,
@Background bgApplicationScope: CoroutineScope,
@Background backgroundCoroutineDispatcher: CoroutineDispatcher
) : DisplayRepository {
@@ -142,8 +140,7 @@ constructor(
private val enabledDisplays =
allDisplayEvents
.map { getDisplays() }
- .flowOn(backgroundCoroutineDispatcher)
- .shareIn(applicationScope, started = SharingStarted.WhileSubscribed(), replay = 1)
+ .shareIn(bgApplicationScope, started = SharingStarted.WhileSubscribed(), replay = 1)
override val displays: Flow<Set<Display>> = enabledDisplays
diff --git a/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
index 447265d806ed..806930d091b1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
@@ -69,7 +69,6 @@ class DisplayRepositoryTest : SysuiTestCase() {
displayManager,
testHandler,
TestScope(UnconfinedTestDispatcher()),
- TestScope(UnconfinedTestDispatcher()),
UnconfinedTestDispatcher()
)
verify(displayManager, never()).registerDisplayListener(any(), any())