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

Commit 9fbdb9cc authored by Chaitanya Cheemala (xWF)'s avatar Chaitanya Cheemala (xWF) Committed by Android (Google) Code Review
Browse files

Revert "Add config value for enabling forced themed icon"

Revert submission 31866669-hide-forced-theme-icon-config

Reason for revert: Likely culprit for b/398816183  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:31866669-hide-forced-theme-icon-config

Change-Id: I93bbc3a5e9dc8b64964f713c851c01637fccc5b2
parent 4e32fde2
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -27,7 +27,4 @@
    <string name="calendar_component_name" translatable="false"></string>
    <string name="clock_component_name" translatable="false"></string>

    <!-- Configures whether to enable forced theme icon, disabled by default -->
    <bool name="enable_forced_themed_icon">false</bool>

</resources>
 No newline at end of file
+0 −12
Original line number Diff line number Diff line
@@ -102,8 +102,6 @@ public class BaseIconFactory implements AutoCloseable {

    private static int PLACEHOLDER_BACKGROUND_COLOR = Color.rgb(245, 245, 245);

    private final boolean mShouldForceThemeIcon;

    protected BaseIconFactory(Context context, int fullResIconDpi, int iconBitmapSize,
            boolean unused) {
        this(context, fullResIconDpi, iconBitmapSize);
@@ -120,9 +118,6 @@ public class BaseIconFactory implements AutoCloseable {
        mCanvas = new Canvas();
        mCanvas.setDrawFilter(new PaintFlagsDrawFilter(DITHER_FLAG, FILTER_BITMAP_FLAG));
        clear();

        mShouldForceThemeIcon = mContext.getResources().getBoolean(
                R.bool.enable_forced_themed_icon);
    }

    protected void clear() {
@@ -268,13 +263,6 @@ public class BaseIconFactory implements AutoCloseable {
        return op;
    }

    /**
     * @return True if forced theme icon is enabled
     */
    public boolean shouldForceThemeIcon() {
        return mShouldForceThemeIcon;
    }

    @NonNull
    protected UserIconInfo getUserInfo(@NonNull UserHandle user) {
        int key = user.hashCode();
+1 −3
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ class MonoIconThemeController(
                factory.getShapePath(icon, Rect(0, 0, info.icon.width, info.icon.height)),
                factory.iconScale,
                sourceHint?.isFileDrawable ?: false,
                factory.shouldForceThemeIcon(),
            )
        if (mono != null) {
            return MonoThemedBitmap(
@@ -86,13 +85,12 @@ class MonoIconThemeController(
        shapePath: Path,
        iconScale: Float,
        isFileDrawable: Boolean,
        shouldForceThemeIcon: Boolean,
    ): Drawable? {
        val mono = base.monochrome
        if (mono != null) {
            return ClippedMonoDrawable(mono, shapePath, iconScale)
        }
        if (Flags.forceMonochromeAppIcons() && shouldForceThemeIcon && !isFileDrawable) {
        if (Flags.forceMonochromeAppIcons() && !isFileDrawable) {
            return MonochromeIconFactory(info.icon.width).wrap(base, shapePath, iconScale)
        }
        return null