Merge "Fix color resolution on status bar"
This commit is contained in:
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.24" android:color="?android:attr/colorBackground" />
|
||||
<item android:alpha="0.24" android:color="@android:color/black" />
|
||||
</selector>
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.47" android:color="?android:attr/colorBackground" />
|
||||
<item android:alpha="0.47" android:color="@android:color/black" />
|
||||
</selector>
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.3" android:color="?android:attr/colorForeground" />
|
||||
<item android:alpha="0.3" android:color="@android:color/white" />
|
||||
</selector>
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?android:attr/colorForeground" />
|
||||
<item android:color="@android:color/white" />
|
||||
</selector>
|
||||
@@ -321,12 +321,15 @@
|
||||
<item name="*android:isLightTheme">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SystemUI.Light" parent="@*android:style/Theme.DeviceDefault.QuickSettings">
|
||||
<style name="Theme.SystemUI.Light">
|
||||
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
|
||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||
<item name="android:colorControlHighlight">#40000000</item>
|
||||
<item name="passwordStyle">@style/PasswordTheme.Light</item>
|
||||
|
||||
<!-- Needed for MediaRoute chooser dialog -->
|
||||
<item name="*android:isLightTheme">true</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPatternStyle">
|
||||
|
||||
@@ -82,7 +82,6 @@ public class BatteryMeterView extends LinearLayout implements
|
||||
|
||||
private int mLightModeBackgroundColor;
|
||||
private int mLightModeFillColor;
|
||||
private float mDarkIntensity;
|
||||
private int mUser;
|
||||
|
||||
/**
|
||||
@@ -321,8 +320,6 @@ public class BatteryMeterView extends LinearLayout implements
|
||||
|
||||
@Override
|
||||
public void onDarkChanged(Rect area, float darkIntensity, int tint) {
|
||||
mDarkIntensity = darkIntensity;
|
||||
|
||||
float intensity = DarkIconDispatcher.isInArea(area, this) ? darkIntensity : 0;
|
||||
mNonAdaptedForegroundColor = getColorForDarkIntensity(
|
||||
intensity, mLightModeFillColor, mDarkModeFillColor);
|
||||
@@ -342,14 +339,6 @@ public class BatteryMeterView extends LinearLayout implements
|
||||
}
|
||||
}
|
||||
|
||||
public void setFillColor(int color) {
|
||||
if (mLightModeFillColor == color) {
|
||||
return;
|
||||
}
|
||||
mLightModeFillColor = color;
|
||||
onDarkChanged(new Rect(), mDarkIntensity, DarkIconDispatcher.DEFAULT_ICON_TINT);
|
||||
}
|
||||
|
||||
private int getColorForDarkIntensity(float darkIntensity, int lightColor, int darkColor) {
|
||||
return (int) ArgbEvaluator.getInstance().evaluate(darkIntensity, lightColor, darkColor);
|
||||
}
|
||||
|
||||
@@ -447,8 +447,8 @@ public class KeyguardStatusBarView extends RelativeLayout
|
||||
R.color.light_mode_icon_color_single_tone);
|
||||
float intensity = textColor == Color.WHITE ? 0 : 1;
|
||||
mCarrierLabel.setTextColor(iconColor);
|
||||
mBatteryView.setFillColor(iconColor);
|
||||
mIconManager.setTint(iconColor);
|
||||
mBatteryView.setColorsFromContext(mContext);
|
||||
Rect tintArea = new Rect(0, 0, 0, 0);
|
||||
|
||||
applyDarkness(R.id.battery, tintArea, intensity, iconColor);
|
||||
|
||||
Reference in New Issue
Block a user