summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt
index 4edba2785e89..3b9870881c60 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt
@@ -47,14 +47,16 @@ class ShadeDialogContextInteractorImpl
constructor(
@Main private val defaultContext: Context,
private val displayWindowPropertyRepository: Provider<DisplayWindowPropertiesRepository>,
- private val shadeDisplaysRepository: ShadeDisplaysRepository,
+ private val shadeDisplaysRepository: Provider<ShadeDisplaysRepository>,
@Background private val bgScope: CoroutineScope,
) : CoreStartable, ShadeDialogContextInteractor {
override fun start() {
if (ShadeWindowGoesAround.isUnexpectedlyInLegacyMode()) return
bgScope.launchTraced(TAG) {
- shadeDisplaysRepository.displayId
+ shadeDisplaysRepository
+ .get()
+ .displayId
// No need for default display pre-warming.
.filter { it != Display.DEFAULT_DISPLAY }
.collectLatest { displayId ->
@@ -70,7 +72,7 @@ constructor(
if (!ShadeWindowGoesAround.isEnabled) {
return defaultContext
}
- val displayId = shadeDisplaysRepository.displayId.value
+ val displayId = shadeDisplaysRepository.get().displayId.value
return getContextOrDefault(displayId)
}