diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt index dde36289f139..5f476ea7e274 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt @@ -17,18 +17,17 @@ package com.android.systemui.qs.tiles.base.viewmodel import com.android.systemui.coroutines.newTracingContext -import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.dagger.qualifiers.Background import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob /** Creates a [CoroutineScope] for the [QSTileViewModelImpl]. */ class QSTileCoroutineScopeFactory @Inject -constructor(@Application private val applicationScope: CoroutineScope) { +constructor(@Background private val bgDispatcher: CoroutineDispatcher) { fun create(): CoroutineScope = - CoroutineScope( - applicationScope.coroutineContext + SupervisorJob() + newTracingContext("QSTileScope") - ) + CoroutineScope(bgDispatcher + SupervisorJob() + newTracingContext("QSTileScope")) } |