Merge "Fix signal color in dark mode" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ef1fdf1849
@@ -90,6 +90,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn
|
||||
private OngoingPrivacyChip mPrivacyChip;
|
||||
private Space mSpace;
|
||||
private BatteryMeterView mBatteryRemainingIcon;
|
||||
private TintedIconManager mTintedIconManager;
|
||||
|
||||
// Used for RingerModeTracker
|
||||
private final LifecycleRegistry mLifecycle = new LifecycleRegistry(this);
|
||||
@@ -144,6 +145,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn
|
||||
}
|
||||
|
||||
void onAttach(TintedIconManager iconManager) {
|
||||
mTintedIconManager = iconManager;
|
||||
int fillColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||
android.R.attr.textColorPrimary);
|
||||
|
||||
@@ -268,6 +270,9 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn
|
||||
android.R.attr.textColorSecondary);
|
||||
mTextColorPrimary = textColor;
|
||||
mClockView.setTextColor(textColor);
|
||||
if (mTintedIconManager != null) {
|
||||
mTintedIconManager.setTint(textColor);
|
||||
}
|
||||
mBatteryRemainingIcon.updateColors(mTextColorPrimary, textColorSecondary,
|
||||
mTextColorPrimary);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import static com.android.systemui.statusbar.StatusBarIconView.STATE_ICON;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FeatureFlagUtils;
|
||||
@@ -238,11 +237,7 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver,
|
||||
@Override
|
||||
public void setStaticDrawableColor(int color) {
|
||||
ColorStateList list = ColorStateList.valueOf(color);
|
||||
float intensity = color == Color.WHITE ? 0 : 1;
|
||||
// We want the ability to change the theme from the one set by SignalDrawable in certain
|
||||
// surfaces. In this way, we can pass a theme to the view.
|
||||
mMobileDrawable.setTintList(
|
||||
ColorStateList.valueOf(mDualToneHandler.getSingleColor(intensity)));
|
||||
mMobileDrawable.setTintList(list);
|
||||
mIn.setImageTintList(list);
|
||||
mOut.setImageTintList(list);
|
||||
mMobileType.setImageTintList(list);
|
||||
|
||||
Reference in New Issue
Block a user