Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f7c54f1 authored by Catherine Liang's avatar Catherine Liang
Browse files

Clean up after Icons floating sheet change

Rename shape grid classes to grid only to reflect their new
functionality. Make sure grid toolbar title shows correctly.

Flag: com.android.systemui.shared.new_customization_picker_ui
Bug: 402161932
Test: manually verified
Change-Id: I4573306884b1ae4df45627f5577132bfc98ae1c6
parent 72343fd7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@ import java.lang.ref.WeakReference
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.launch

// TODO (b/402161932): rename shape grid classes and clean up view model and below
object ShapeGridFloatingSheetBinder {
object GridFloatingSheetBinder {

    fun bind(
        view: View,
@@ -49,7 +48,7 @@ object ShapeGridFloatingSheetBinder {
        lifecycleOwner: LifecycleOwner,
        backgroundDispatcher: CoroutineDispatcher,
    ) {
        val viewModel = optionsViewModel.fridPickerViewModel
        val viewModel = optionsViewModel.gridPickerViewModel
        val isFloatingSheetActive = { optionsViewModel.selectedOption.value == GRID }

        val floatingSheetContainer =
+2 −2
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO
                    }

                    launch {
                        optionsViewModel.fridPickerViewModel.selectedGridOption.collect { gridOption
                        optionsViewModel.gridPickerViewModel.selectedGridOption.collect { gridOption
                            ->
                            optionGridDescription?.let { TextViewBinder.bind(it, gridOption.text) }
                            gridOption.payload?.let { optionGridIcon?.setImageDrawable(it) }
@@ -496,7 +496,7 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO
            }

        customizationOptionFloatingSheetViewMap?.get(ThemePickerHomeCustomizationOption.GRID)?.let {
            ShapeGridFloatingSheetBinder.bind(
            GridFloatingSheetBinder.bind(
                it,
                optionsViewModel,
                colorUpdateViewModel,
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ constructor(private val defaultToolbarBinder: DefaultToolbarBinder) : ToolbarBin
                        val stringResId =
                            when (it) {
                                COLORS -> ThemePickerR.string.system_colors_title
                                GRID -> ThemePickerR.string.shape_and_grid_title
                                GRID -> ThemePickerR.string.grid_layout
                                CLOCK -> ThemePickerR.string.clock_title
                                SHORTCUTS ->
                                    ThemePickerR.string.keyguard_quick_affordance_section_title
Loading