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

Commit ab037d1e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 14032571 from dd0eb8fa to 25Q4-release

Change-Id: I3fe2365ef8284d529221bb187f2960d2925cd1ab
parents efa0c726 dd0eb8fa
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
        style="@style/CustomizationOptionEntryTitleTextStyle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/pack_theme_title"
        android:layout_marginEnd="@dimen/customization_option_entry_text_margin_end"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/option_entry_icon_container"
@@ -42,7 +41,6 @@
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/customization_option_entry_text_margin_end"
        android:text="@string/theme_packs_description"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/option_entry_icon_container"
        app:layout_constraintStart_toStartOf="parent"
+0 −8
Original line number Diff line number Diff line
@@ -392,16 +392,8 @@

    <!-- Title of a section of the customization where the user can select color override for icon. [CHAR LIMIT=40] -->
    <string name="themed_icon_beta_title">Themed icons (beta)</string>

    <!-- Title of a section of the pack theme where the user enter the theme app. [CHAR LIMIT=30] -->
    <string name="pack_theme_title">Title</string>

    <!-- Title of the tag to indicate beta version. [CHAR LIMIT=6] -->
    <string name="beta_title">Beta</string>

    <!-- The description of theme picker entry. [CHAR LIMIT=30] -->
    <string name="theme_packs_description">Description</string>

    <!-- The content description of grid picker entry. [CHAR LIMIT=NONE] -->
    <string name="gird_picker_entry_content_description" msgid="7538418512525897691">Change app grid</string>

+3 −3
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import static com.android.customization.model.color.ColorOptionsProvider.OVERLAY
import android.app.WallpaperColors;
import android.content.ContentResolver;
import android.content.Context;
import android.content.theming.ThemeStyle;
import android.database.ContentObserver;
import android.graphics.Color;
import android.net.Uri;
@@ -48,7 +49,6 @@ import com.android.customization.model.ResourceConstants;
import com.android.customization.model.color.ColorOptionsProvider.ColorSource;
import com.android.customization.model.theme.OverlayManagerCompat;
import com.android.customization.module.logging.ThemesUserEventLogger;
import com.android.systemui.monet.Style;
import com.android.themepicker.R;

import org.json.JSONArray;
@@ -170,7 +170,7 @@ public class ColorCustomizationManager implements CustomizationManager<ColorOpti
                overlaysJson.put(OVERLAY_COLOR_SOURCE, colorOption.getSource());
                overlaysJson.put(OVERLAY_COLOR_INDEX, String.valueOf(colorOption.getIndex()));
                overlaysJson.put(OVERLAY_THEME_STYLE,
                        String.valueOf(Style.toString(colorOption.getStyle())));
                        String.valueOf(ThemeStyle.toString(colorOption.getStyle())));

                // OVERLAY_COLOR_BOTH is only for wallpaper color case, not preset.
                if (!COLOR_SOURCE_PRESET.equals(colorOption.getSource())) {
@@ -273,7 +273,7 @@ public class ColorCustomizationManager implements CustomizationManager<ColorOpti

    /**
     * @return The style of the currently applied color. One of enum values in
     * {@link com.android.systemui.monet.Style}.
     * {@link ThemeStyle}.
     */
    public @Nullable String getCurrentStyle() {
        if (mCurrentStyle == null) {
+6 −6
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SYSTEM_PALETTE;

import android.content.Context;
import android.content.theming.ThemeStyle;
import android.text.TextUtils;
import android.util.Log;

@@ -29,7 +30,6 @@ import com.android.customization.model.CustomizationManager;
import com.android.customization.model.CustomizationOption;
import com.android.customization.model.color.ColorOptionsProvider.ColorSource;
import com.android.customization.module.logging.ThemesUserEventLogger;
import com.android.systemui.monet.Style;
import com.android.themepicker.R;

import org.json.JSONException;
@@ -57,14 +57,14 @@ public abstract class ColorOption implements CustomizationOption<ColorOption> {
    protected final Map<String, String> mPackagesByCategory;
    private final String mTitle;
    private final boolean mIsDefault;
    @Style.Type
    @ThemeStyle.Type
    private final Integer mStyle;
    private final int mIndex;
    private CharSequence mContentDescription;
    private final @ColorInt int mSeedColor;

    protected ColorOption(String title, Map<String, String> overlayPackages, boolean isDefault,
            int seedColor, @Style.Type Integer style, int index) {
            int seedColor, @ThemeStyle.Type Integer style, int index) {
        mTitle = title;
        mIsDefault = isDefault;
        mSeedColor = seedColor;
@@ -84,9 +84,9 @@ public abstract class ColorOption implements CustomizationOption<ColorOption> {

        String currentStyle = colorManager.getCurrentStyle();
        if (TextUtils.isEmpty(currentStyle)) {
            currentStyle = Style.toString(Style.TONAL_SPOT);
            currentStyle = ThemeStyle.toString(ThemeStyle.TONAL_SPOT);
        }
        boolean isCurrentStyle = TextUtils.equals(Style.toString(getStyle()), currentStyle);
        boolean isCurrentStyle = TextUtils.equals(ThemeStyle.toString(getStyle()), currentStyle);

        if (mIsDefault) {
            String serializedOverlays = colorManager.getStoredOverlays();
@@ -227,7 +227,7 @@ public abstract class ColorOption implements CustomizationOption<ColorOption> {
    /**
     * @return the style of this color option
     */
    @Style.Type
    @ThemeStyle.Type
    public Integer getStyle() {
        return mStyle;
    }
+4 −4
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@
package com.android.customization.model.color

import android.content.Context
import android.content.theming.ThemeStyle
import android.stats.style.StyleEnums
import android.view.View
import androidx.annotation.ColorInt
import com.android.customization.model.color.ColorOptionsProvider.ColorSource
import com.android.customization.picker.color.shared.model.ColorType
import com.android.systemui.monet.Style
import com.android.themepicker.R

/**
@@ -34,7 +34,7 @@ class ColorOptionImpl(
    isDefault: Boolean,
    private val source: String?,
    seedColor: Int,
    @Style.Type style: Int,
    @ThemeStyle.Type style: Int,
    index: Int,
    private val previewInfo: PreviewInfo,
    val type: ColorType,
@@ -77,7 +77,7 @@ class ColorOptionImpl(
        }
    }

    override fun getStyleForLogging(): Int = Style.toString(style).hashCode()
    override fun getStyleForLogging(): Int = ThemeStyle.toString(style).hashCode()

    class Builder {
        var title: String? = null
@@ -89,7 +89,7 @@ class ColorOptionImpl(
        @ColorSource var source: String? = null
        var isDefault = false
        @ColorInt var seedColor = 0
        @Style.Type var style = Style.TONAL_SPOT
        @ThemeStyle.Type var style = ThemeStyle.TONAL_SPOT
        var index = 0
        var packages: MutableMap<String, String?> = HashMap()
        var type = ColorType.WALLPAPER_COLOR
Loading