diff options
| author | 2024-10-17 17:23:29 -0400 | |
|---|---|---|
| committer | 2024-10-17 17:25:57 -0400 | |
| commit | 612b0ac97b9c40671d03a9e87e0cf5fc8c53f46d (patch) | |
| tree | ed6e1b0d6c31871d17f1a1bcfaa5341fe1317aaf | |
| parent | 205cd9fdd315f19dc2a806538fb082f2f1671f86 (diff) | |
[sb] Don't pass in application context, use the root's instead
StatusBarRoot should just rely on its root, since it can be instantiated
for different windows
Test: none, changing the constructor
Bug: 364360986
Flag: com.android.systemui.status_bar_simple_fragment
Change-Id: I913ab832e8e7436b5d4831c82c9c5211802a01cd
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/composable/StatusBarRoot.kt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/composable/StatusBarRoot.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/composable/StatusBarRoot.kt index 440eb91841ee..a21cc22ad03f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/composable/StatusBarRoot.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/composable/StatusBarRoot.kt @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.pipeline.shared.ui.composable -import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -50,7 +49,6 @@ import kotlinx.coroutines.launch class StatusBarRootFactory @Inject constructor( - private val context: Context, private val homeStatusBarViewModel: HomeStatusBarViewModel, private val homeStatusBarViewBinder: HomeStatusBarViewBinder, private val notificationIconsBinder: NotificationIconContainerStatusBarViewBinder, @@ -59,7 +57,7 @@ constructor( private val ongoingCallController: OngoingCallController, ) { fun create(root: ViewGroup, andThen: (ViewGroup) -> Unit): ComposeView { - val composeView = ComposeView(context) + val composeView = ComposeView(root.context) composeView.apply { setContent { StatusBarRoot( |