Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25299db4 authored by Evan Laird's avatar Evan Laird Committed by android-build-merger
Browse files

Merge "DO NOT MERGE Turn off LAYER_TYPE_SOFTWARE on BatteryMeterView" into qt-dev

am: eb24d06f

Change-Id: I619e34943d8b669ca8ddfa8337f695919b52a13d
parents 1342c26c eb24d06f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int)
    }

    override fun draw(c: Canvas) {
        c.saveLayer(null, null)
        unifiedPath.reset()
        levelPath.reset()
        levelRect.set(fillRect)
@@ -243,6 +244,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int)
            // And draw the plus sign on top of the fill
            c.drawPath(scaledPlus, errorPaint)
        }
        c.restore()
    }

    private fun batteryColorForLevel(level: Int): Int {
+0 −4
Original line number Diff line number Diff line
@@ -180,10 +180,6 @@ public class BatteryMeterView extends LinearLayout implements
        setClipChildren(false);
        setClipToPadding(false);
        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() {