Merge "Choose correct icon shade of grey" into oc-dr1-dev
am: 1f358f1885
Change-Id: I5e05e4a5b3fa4bc5a651b7a7a010dbee36300239
This commit is contained in:
@@ -334,16 +334,18 @@ public class KeyguardStatusBarView extends RelativeLayout
|
|||||||
|
|
||||||
public void onOverlayChanged() {
|
public void onOverlayChanged() {
|
||||||
@ColorInt int textColor = Utils.getColorAttr(mContext, R.attr.wallpaperTextColor);
|
@ColorInt int textColor = Utils.getColorAttr(mContext, R.attr.wallpaperTextColor);
|
||||||
mCarrierLabel.setTextColor(textColor);
|
@ColorInt int iconColor = Utils.getDefaultColor(mContext, Color.luminance(textColor) < 0.5 ?
|
||||||
mBatteryView.setFillColor(textColor);
|
R.color.dark_mode_icon_color_single_tone :
|
||||||
mIconManager.setTint(textColor);
|
R.color.light_mode_icon_color_single_tone);
|
||||||
|
|
||||||
float intensity = textColor == Color.WHITE ? 0 : 1;
|
float intensity = textColor == Color.WHITE ? 0 : 1;
|
||||||
|
mCarrierLabel.setTextColor(iconColor);
|
||||||
|
mBatteryView.setFillColor(iconColor);
|
||||||
|
mIconManager.setTint(iconColor);
|
||||||
Rect tintArea = new Rect(0, 0, 0, 0);
|
Rect tintArea = new Rect(0, 0, 0, 0);
|
||||||
|
|
||||||
applyDarkness(R.id.signal_cluster, tintArea, intensity, textColor);
|
applyDarkness(R.id.signal_cluster, tintArea, intensity, iconColor);
|
||||||
applyDarkness(R.id.battery, tintArea, intensity, textColor);
|
applyDarkness(R.id.battery, tintArea, intensity, iconColor);
|
||||||
applyDarkness(R.id.clock, tintArea, intensity, textColor);
|
applyDarkness(R.id.clock, tintArea, intensity, iconColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyDarkness(int id, Rect tintArea, float intensity, int color) {
|
private void applyDarkness(int id, Rect tintArea, float intensity, int color) {
|
||||||
|
|||||||
Reference in New Issue
Block a user