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

Commit 692e31db authored by George Lin's avatar George Lin
Browse files

Remove the SHAPE enrty

Remove SHAPE entry since SHAPE is going to be in the same entry as GRID

Test: Build sucess
Bug: 362237825
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: Iec9a2b34aae35325dccae742f79a8b542bf10d48
parent 36721501
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingHorizontal="@dimen/customization_option_entry_horizontal_padding"
    android:paddingVertical="@dimen/customization_option_entry_vertical_padding"
    android:clickable="true">

    <TextView
        style="@style/CustomizationOptionEntryTitleTextStyle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/preview_name_shape"
        android:layout_marginEnd="@dimen/customization_option_entry_text_margin_end"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/option_entry_app_shape_icon"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed" />

    <FrameLayout
        android:id="@+id/option_entry_app_shape_icon"
        android:layout_width="@dimen/customization_option_entry_icon_size"
        android:layout_height="@dimen/customization_option_entry_icon_size"
        android:orientation="horizontal"
        android:background="@drawable/customization_option_entry_icon_background"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
+2 −2
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO

        val optionShapeAndGrid =
            homeScreenCustomizationOptionEntries
                .find { it.first == ThemePickerHomeCustomizationOption.APP_GRID }
                .find { it.first == ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID }
                ?.second
        val optionShapeAndGridDescription =
            optionShapeAndGrid?.findViewById<TextView>(R.id.option_entry_app_grid_description)
@@ -222,7 +222,7 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO
            }

        customizationOptionFloatingSheetViewMap
            ?.get(ThemePickerHomeCustomizationOption.APP_GRID)
            ?.get(ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID)
            ?.let {
                ShapeAndGridFloatingSheetBinder.bind(
                    it,
+7 −15
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ constructor(private val defaultCustomizationOptionUtil: DefaultCustomizationOpti

    enum class ThemePickerHomeCustomizationOption : CustomizationOptionUtil.CustomizationOption {
        COLORS,
        APP_GRID,
        APP_SHAPE,
        APP_SHAPE_AND_GRID,
        THEMED_ICONS,
    }

@@ -109,17 +108,9 @@ constructor(private val defaultCustomizationOptionUtil: DefaultCustomizationOpti
                            )
                    )
                    add(
                        ThemePickerHomeCustomizationOption.APP_GRID to
                        ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID to
                            layoutInflater.inflate(
                                R.layout.customization_option_entry_app_grid,
                                optionContainer,
                                false,
                            )
                    )
                    add(
                        ThemePickerHomeCustomizationOption.APP_SHAPE to
                            layoutInflater.inflate(
                                R.layout.customization_option_entry_app_shape,
                                R.layout.customization_option_entry_app_shape_and_grid,
                                optionContainer,
                                false,
                            )
@@ -172,9 +163,9 @@ constructor(private val defaultCustomizationOptionUtil: DefaultCustomizationOpti
                    .also { bottomSheetContainer.addView(it) }
            )
            put(
                ThemePickerHomeCustomizationOption.APP_GRID,
                ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID,
                inflateFloatingSheet(
                        ThemePickerHomeCustomizationOption.APP_GRID,
                        ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID,
                        bottomSheetContainer,
                        layoutInflater,
                    )
@@ -192,7 +183,8 @@ constructor(private val defaultCustomizationOptionUtil: DefaultCustomizationOpti
            ThemePickerLockCustomizationOption.CLOCK -> R.layout.floating_sheet_clock
            ThemePickerLockCustomizationOption.SHORTCUTS -> R.layout.floating_sheet_shortcut
            ThemePickerHomeCustomizationOption.COLORS -> R.layout.floating_sheet_colors
            ThemePickerHomeCustomizationOption.APP_GRID -> R.layout.floating_sheet_shape_and_grid
            ThemePickerHomeCustomizationOption.APP_SHAPE_AND_GRID ->
                R.layout.floating_sheet_shape_and_grid
            else ->
                throw IllegalStateException(
                    "Customization option $option does not have a bottom sheet view"
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ constructor(
                {
                    defaultCustomizationOptionsViewModel.selectOption(
                        ThemePickerCustomizationOptionUtil.ThemePickerHomeCustomizationOption
                            .APP_GRID
                            .APP_SHAPE_AND_GRID
                    )
                }
            } else {