summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-07 01:44:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-12-07 01:44:24 +0000
commitafa20f3a3aa8acdabd8b7472e18e6b36d7d9e411 (patch)
tree436937fff88746b28de2822a88b0915c66f3f96c
parentab988ebe9afab54d6e46d4079296f413f39de32d (diff)
parent8b2183b8b3bb954cd69611e54113c775ed329580 (diff)
Merge "Make tileScope background" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/viewmodel/QSTileCoroutineScopeFactory.kt9
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"))
}