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

Commit 738a233f authored by Raff Tsai's avatar Raff Tsai Committed by Android (Google) Code Review
Browse files

Merge "Fix Disabled text color in dark theme"

parents aae770ed f7e30954
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -19,13 +19,13 @@ package com.android.settings;
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;

import android.content.Context;
import android.graphics.PorterDuff;
import android.util.AttributeSet;
import android.widget.RadioButton;
import android.widget.TextView;

import com.android.settingslib.RestrictedLockUtils;
import com.android.settingslib.RestrictedLockUtilsInternal;
import com.android.settingslib.utils.ColorUtil;

public class RestrictedRadioButton extends RadioButton {
    private Context mContext;
@@ -67,10 +67,10 @@ public class RestrictedRadioButton extends RadioButton {
            RestrictedLockUtilsInternal.setTextViewAsDisabledByAdmin(mContext,
                    (TextView) this, mDisabledByAdmin);
            if (mDisabledByAdmin) {
                getButtonDrawable().setColorFilter(mContext.getColor(R.color.disabled_text_color),
                        PorterDuff.Mode.MULTIPLY);
                getButtonDrawable().setAlpha(
                        (int) (255 * ColorUtil.getDisabledAlpha(mContext)));
            } else {
                getButtonDrawable().clearColorFilter();
                getButtonDrawable().setAlpha(0);
            }
        }
    }