Loading packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } } override fun draw(c: Canvas) { override fun draw(c: Canvas) { c.saveLayer(null, null) unifiedPath.reset() unifiedPath.reset() levelPath.reset() levelPath.reset() levelRect.set(fillRect) levelRect.set(fillRect) Loading Loading @@ -243,6 +244,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) // And draw the plus sign on top of the fill // And draw the plus sign on top of the fill c.drawPath(scaledPlus, errorPaint) c.drawPath(scaledPlus, errorPaint) } } c.restore() } } private fun batteryColorForLevel(level: Int): Int { private fun batteryColorForLevel(level: Int): Int { Loading packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +0 −4 Original line number Original line Diff line number Diff line Loading @@ -180,10 +180,6 @@ public class BatteryMeterView extends LinearLayout implements setClipChildren(false); setClipChildren(false); setClipToPadding(false); setClipToPadding(false); Dependency.get(ConfigurationController.class).observe(viewAttachLifecycle(this), this); Dependency.get(ConfigurationController.class).observe(viewAttachLifecycle(this), this); // Needed for PorderDuff.Mode.CLEAR operations to work properly, but redraws don't happen // enough to justify a hardware layer. setLayerType(LAYER_TYPE_SOFTWARE, null); } } private void setupLayoutTransition() { private void setupLayoutTransition() { Loading Loading
packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) } } override fun draw(c: Canvas) { override fun draw(c: Canvas) { c.saveLayer(null, null) unifiedPath.reset() unifiedPath.reset() levelPath.reset() levelPath.reset() levelRect.set(fillRect) levelRect.set(fillRect) Loading Loading @@ -243,6 +244,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) // And draw the plus sign on top of the fill // And draw the plus sign on top of the fill c.drawPath(scaledPlus, errorPaint) c.drawPath(scaledPlus, errorPaint) } } c.restore() } } private fun batteryColorForLevel(level: Int): Int { private fun batteryColorForLevel(level: Int): Int { Loading
packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +0 −4 Original line number Original line Diff line number Diff line Loading @@ -180,10 +180,6 @@ public class BatteryMeterView extends LinearLayout implements setClipChildren(false); setClipChildren(false); setClipToPadding(false); setClipToPadding(false); Dependency.get(ConfigurationController.class).observe(viewAttachLifecycle(this), this); Dependency.get(ConfigurationController.class).observe(viewAttachLifecycle(this), this); // Needed for PorderDuff.Mode.CLEAR operations to work properly, but redraws don't happen // enough to justify a hardware layer. setLayerType(LAYER_TYPE_SOFTWARE, null); } } private void setupLayoutTransition() { private void setupLayoutTransition() { Loading