Loading packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsContent.kt +7 −3 Original line number Diff line number Diff line Loading @@ -24,13 +24,17 @@ import androidx.compose.ui.viewinterop.AndroidView import com.android.systemui.res.R @Composable fun BluetoothDetailsContent() { fun BluetoothDetailsContent(detailsContentViewModel: BluetoothTileDialogViewModel) { AndroidView( modifier = Modifier.fillMaxSize(), factory = { context -> // Inflate with the existing dialog xml layout LayoutInflater.from(context).inflate(R.layout.bluetooth_tile_dialog, null) // TODO: b/378513956 - Implement the bluetooth details view val view = LayoutInflater.from(context) .inflate(R.layout.bluetooth_tile_dialog, /* root= */ null) detailsContentViewModel.showDetailsContent(/* expandable= */ null, view) view }, onRelease = { detailsContentViewModel.contentManager.releaseView() }, ) } packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsContentManager.kt +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ data class DeviceItemClick(val deviceItem: DeviceItem, val clickedView: View, va /** View content manager for showing active, connected and saved bluetooth devices. */ class BluetoothDetailsContentManager @AssistedInject internal constructor( constructor( @Assisted private val initialUiProperties: BluetoothTileDialogViewModel.UiProperties, @Assisted private val cachedContentHeight: Int, @Assisted private val bluetoothTileDialogCallback: BluetoothTileDialogCallback, Loading Loading @@ -112,7 +112,7 @@ internal constructor( private lateinit var scrollViewContent: View @AssistedFactory internal interface Factory { interface Factory { fun create( initialUiProperties: BluetoothTileDialogViewModel.UiProperties, cachedContentHeight: Int, Loading packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsViewModel.kt +5 −4 Original line number Diff line number Diff line Loading @@ -18,11 +18,12 @@ package com.android.systemui.bluetooth.qsdialog import com.android.systemui.plugins.qs.TileDetailsViewModel class BluetoothDetailsViewModel(onLongClick: () -> Unit) : TileDetailsViewModel() { private val _onLongClick = onLongClick class BluetoothDetailsViewModel( private val onSettingsClick: () -> Unit, val detailsContentViewModel: BluetoothTileDialogViewModel, ) : TileDetailsViewModel() { override fun clickOnSettingsButton() { _onLongClick() onSettingsClick() } override fun getTitle(): String { Loading packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothTileDialogDelegate.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import dagger.assisted.AssistedInject /** Dialog for showing active, connected and saved bluetooth devices. */ class BluetoothTileDialogDelegate @AssistedInject internal constructor( constructor( @Assisted private val initialUiProperties: BluetoothTileDialogViewModel.UiProperties, @Assisted private val cachedContentHeight: Int, @Assisted private val bluetoothTileDialogCallback: BluetoothTileDialogCallback, Loading @@ -46,7 +46,7 @@ internal constructor( lateinit var contentManager: BluetoothDetailsContentManager @AssistedFactory internal interface Factory { interface Factory { fun create( initialUiProperties: BluetoothTileDialogViewModel.UiProperties, cachedContentHeight: Int, Loading packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothTileDialogViewModel.kt +2 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ import kotlinx.coroutines.withContext * by the dialog view. */ @SysUISingleton internal class BluetoothTileDialogViewModel class BluetoothTileDialogViewModel @Inject constructor( private val deviceItemInteractor: DeviceItemInteractor, Loading Loading @@ -396,7 +396,7 @@ constructor( else R.string.bt_is_off } internal data class UiProperties( data class UiProperties( @StringRes val subTitleResId: Int, val autoOnToggleVisibility: Int, @DimenRes val scrollViewMinHeightResId: Int, Loading Loading
packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsContent.kt +7 −3 Original line number Diff line number Diff line Loading @@ -24,13 +24,17 @@ import androidx.compose.ui.viewinterop.AndroidView import com.android.systemui.res.R @Composable fun BluetoothDetailsContent() { fun BluetoothDetailsContent(detailsContentViewModel: BluetoothTileDialogViewModel) { AndroidView( modifier = Modifier.fillMaxSize(), factory = { context -> // Inflate with the existing dialog xml layout LayoutInflater.from(context).inflate(R.layout.bluetooth_tile_dialog, null) // TODO: b/378513956 - Implement the bluetooth details view val view = LayoutInflater.from(context) .inflate(R.layout.bluetooth_tile_dialog, /* root= */ null) detailsContentViewModel.showDetailsContent(/* expandable= */ null, view) view }, onRelease = { detailsContentViewModel.contentManager.releaseView() }, ) }
packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsContentManager.kt +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ data class DeviceItemClick(val deviceItem: DeviceItem, val clickedView: View, va /** View content manager for showing active, connected and saved bluetooth devices. */ class BluetoothDetailsContentManager @AssistedInject internal constructor( constructor( @Assisted private val initialUiProperties: BluetoothTileDialogViewModel.UiProperties, @Assisted private val cachedContentHeight: Int, @Assisted private val bluetoothTileDialogCallback: BluetoothTileDialogCallback, Loading Loading @@ -112,7 +112,7 @@ internal constructor( private lateinit var scrollViewContent: View @AssistedFactory internal interface Factory { interface Factory { fun create( initialUiProperties: BluetoothTileDialogViewModel.UiProperties, cachedContentHeight: Int, Loading
packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothDetailsViewModel.kt +5 −4 Original line number Diff line number Diff line Loading @@ -18,11 +18,12 @@ package com.android.systemui.bluetooth.qsdialog import com.android.systemui.plugins.qs.TileDetailsViewModel class BluetoothDetailsViewModel(onLongClick: () -> Unit) : TileDetailsViewModel() { private val _onLongClick = onLongClick class BluetoothDetailsViewModel( private val onSettingsClick: () -> Unit, val detailsContentViewModel: BluetoothTileDialogViewModel, ) : TileDetailsViewModel() { override fun clickOnSettingsButton() { _onLongClick() onSettingsClick() } override fun getTitle(): String { Loading
packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothTileDialogDelegate.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import dagger.assisted.AssistedInject /** Dialog for showing active, connected and saved bluetooth devices. */ class BluetoothTileDialogDelegate @AssistedInject internal constructor( constructor( @Assisted private val initialUiProperties: BluetoothTileDialogViewModel.UiProperties, @Assisted private val cachedContentHeight: Int, @Assisted private val bluetoothTileDialogCallback: BluetoothTileDialogCallback, Loading @@ -46,7 +46,7 @@ internal constructor( lateinit var contentManager: BluetoothDetailsContentManager @AssistedFactory internal interface Factory { interface Factory { fun create( initialUiProperties: BluetoothTileDialogViewModel.UiProperties, cachedContentHeight: Int, Loading
packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/BluetoothTileDialogViewModel.kt +2 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ import kotlinx.coroutines.withContext * by the dialog view. */ @SysUISingleton internal class BluetoothTileDialogViewModel class BluetoothTileDialogViewModel @Inject constructor( private val deviceItemInteractor: DeviceItemInteractor, Loading Loading @@ -396,7 +396,7 @@ constructor( else R.string.bt_is_off } internal data class UiProperties( data class UiProperties( @StringRes val subTitleResId: Int, val autoOnToggleVisibility: Int, @DimenRes val scrollViewMinHeightResId: Int, Loading