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

Commit 34b8bf5d authored by Evan Laird's avatar Evan Laird
Browse files

[[Old] Battery] Set the battery colors in ShadeHeaderController

The shade header controller explicitly sets the `textColorPrimary` as
the foreground tint for the rest of the icons. This also uses those
colors for the battery configuration.

Test: visual
Bug: 330439834
Flag: NONE
Change-Id: Ied40e56a166d8a30af8ed5ad87290185e251d22b
parent 69b03fa3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -303,10 +303,18 @@ constructor(
        // battery settings same as in QS icons
        batteryMeterViewController.ignoreTunerUpdates()

        val fgColor =
            Utils.getColorAttrDefaultColor(header.context, android.R.attr.textColorPrimary)
        val bgColor =
            Utils.getColorAttrDefaultColor(header.context, android.R.attr.textColorPrimaryInverse)

        iconManager = tintedIconManagerFactory.create(iconContainer, StatusBarLocation.QS)
        iconManager.setTint(
            Utils.getColorAttrDefaultColor(header.context, android.R.attr.textColorPrimary),
            Utils.getColorAttrDefaultColor(header.context, android.R.attr.textColorPrimaryInverse),
        iconManager.setTint(fgColor, bgColor)

        batteryIcon.updateColors(
            fgColor /* foreground */,
            bgColor /* background */,
            fgColor /* single tone (current default) */
        )

        carrierIconSlots =