Loading core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3971,7 +3971,7 @@ M5,17.5 V12 H3 L7,4.5 V10 h2 L5,17.5 z </string> <string name="config_batterymeterPowersavePath" translatable="false"> M9.75,10l-2.5,0l0,-2.5l-2.5,0l0,2.5l-2.5,0l0,2.5l2.5,0l0,2.5l2.5,0l0,-2.5l2.5,0z M9,10l-2,0l0,-2l-2,0l0,2l-2,0l0,2l2,0l0,2l2,0l0,-2l2,0z </string> <!-- A dual tone battery meter draws the perimeter path twice - once to define the shape Loading packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +4 −9 Original line number Diff line number Diff line Loading @@ -130,11 +130,12 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } private val errorPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> p.color = Utils.getColorErrorDefaultColor(context) p.color = Utils.getColorStateListDefaultColor(context, R.color.batterymeter_plus_color) p.alpha = 255 p.isDither = true p.strokeWidth = 0f p.style = Paint.Style.FILL_AND_STROKE p.blendMode = BlendMode.SRC } // Only used if dualTone is set to true Loading Loading @@ -201,10 +202,6 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) if (!invertFillIcon) { c.drawPath(scaledBolt, fillPaint) } } else if (powerSaveEnabled) { // Clip out the plus shape unifiedPath.op(scaledPlus, Path.Op.DIFFERENCE) c.drawPath(scaledPlus, errorPaint) } if (dualTone) { Loading Loading @@ -243,10 +240,8 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } else if (powerSaveEnabled) { // If power save is enabled draw the perimeter path with colorError c.drawPath(scaledPerimeter, errorPaint) // But always put path protection around the plus sign c.clipOutPath(scaledPlus) c.drawPath(scaledPlus, fillColorStrokeProtection) // And draw the plus sign on top of the fill c.drawPath(scaledPlus, errorPaint) } } Loading packages/SystemUI/res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,7 @@ <style name="qs_theme" parent="@*android:style/Theme.DeviceDefault.QuickSettings"> <item name="lightIconTheme">@style/QSIconTheme</item> <item name="darkIconTheme">@style/QSIconTheme</item> <item name="android:colorError">@*android:color/error_color_material_dark</item> <item name="android:windowIsFloating">true</item> </style> Loading Loading
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3971,7 +3971,7 @@ M5,17.5 V12 H3 L7,4.5 V10 h2 L5,17.5 z </string> <string name="config_batterymeterPowersavePath" translatable="false"> M9.75,10l-2.5,0l0,-2.5l-2.5,0l0,2.5l-2.5,0l0,2.5l2.5,0l0,2.5l2.5,0l0,-2.5l2.5,0z M9,10l-2,0l0,-2l-2,0l0,2l-2,0l0,2l2,0l0,2l2,0l0,-2l2,0z </string> <!-- A dual tone battery meter draws the perimeter path twice - once to define the shape Loading
packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +4 −9 Original line number Diff line number Diff line Loading @@ -130,11 +130,12 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } private val errorPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> p.color = Utils.getColorErrorDefaultColor(context) p.color = Utils.getColorStateListDefaultColor(context, R.color.batterymeter_plus_color) p.alpha = 255 p.isDither = true p.strokeWidth = 0f p.style = Paint.Style.FILL_AND_STROKE p.blendMode = BlendMode.SRC } // Only used if dualTone is set to true Loading Loading @@ -201,10 +202,6 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) if (!invertFillIcon) { c.drawPath(scaledBolt, fillPaint) } } else if (powerSaveEnabled) { // Clip out the plus shape unifiedPath.op(scaledPlus, Path.Op.DIFFERENCE) c.drawPath(scaledPlus, errorPaint) } if (dualTone) { Loading Loading @@ -243,10 +240,8 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } else if (powerSaveEnabled) { // If power save is enabled draw the perimeter path with colorError c.drawPath(scaledPerimeter, errorPaint) // But always put path protection around the plus sign c.clipOutPath(scaledPlus) c.drawPath(scaledPlus, fillColorStrokeProtection) // And draw the plus sign on top of the fill c.drawPath(scaledPlus, errorPaint) } } Loading
packages/SystemUI/res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,7 @@ <style name="qs_theme" parent="@*android:style/Theme.DeviceDefault.QuickSettings"> <item name="lightIconTheme">@style/QSIconTheme</item> <item name="darkIconTheme">@style/QSIconTheme</item> <item name="android:colorError">@*android:color/error_color_material_dark</item> <item name="android:windowIsFloating">true</item> </style> Loading