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

Unverified Commit 47d0eb86 authored by Tim Zimmermann's avatar Tim Zimmermann Committed by Michael Bestas
Browse files

SystemUI: Follow light/dark theme in new QS footer actions

* Needed after 2feceb2c
* Only settings and power button needed to be changed

Change-Id: I14b04ba206d31784d9e5a1351d1fcbb1d258e52b
parent 337589ee
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -145,7 +145,11 @@ class FooterActionsViewModel(
                R.drawable.ic_settings,
                ContentDescription.Resource(R.string.accessibility_quick_settings_settings)
            ),
            iconTint = null,
            iconTint =
                Utils.getColorAttrDefaultColor(
                    context,
                    com.android.internal.R.attr.textColorPrimary,
                ),
            backgroundColor = R.attr.offStateColor,
            this::onSettingsButtonClicked,
        )
@@ -162,7 +166,7 @@ class FooterActionsViewModel(
                iconTint =
                    Utils.getColorAttrDefaultColor(
                        context,
                        com.android.internal.R.attr.textColorOnAccent,
                        com.android.internal.R.attr.textColorPrimaryInverse,
                    ),
                backgroundColor = com.android.internal.R.attr.colorAccent,
                this::onPowerButtonClicked,
+8 −2
Original line number Diff line number Diff line
@@ -85,7 +85,13 @@ class FooterActionsViewModelTest : SysuiTestCase() {
                )
            )
        assertThat(settings.backgroundColor).isEqualTo(R.attr.offStateColor)
        assertThat(settings.iconTint).isNull()
        assertThat(settings.iconTint)
            .isEqualTo(
                Utils.getColorAttrDefaultColor(
                    context,
                    com.android.internal.R.attr.textColorPrimary,
                ),
            )
    }

    @Test
@@ -110,7 +116,7 @@ class FooterActionsViewModelTest : SysuiTestCase() {
            .isEqualTo(
                Utils.getColorAttrDefaultColor(
                    context,
                    com.android.internal.R.attr.textColorOnAccent,
                    com.android.internal.R.attr.textColorPrimaryInverse,
                ),
            )
    }