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

Commit 4b5f0839 authored by Evan Laird's avatar Evan Laird
Browse files

[shade] use the theme colors for the battery icon

Test: manual
Bug: 417082428
Flag: EXEMPT bugfix
Change-Id: I76197980879da1ead2f9507a5760374b6273433c
parent ab17cdf2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.view.ViewGroup
import android.view.WindowInsets
import android.widget.TextView
import androidx.annotation.VisibleForTesting
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.getValue
@@ -424,10 +425,11 @@ constructor(
                    PlatformTheme {
                        id = R.id.battery_meter_composable_view
                        val showBatteryEstimate by showBatteryEstimate.collectAsStateWithLifecycle()
                        val dark = isSystemInDarkTheme()
                        BatteryWithChargeStatus(
                            modifier = Modifier.wrapContentSize(),
                            viewModelFactory = tandemBatteryViewModelFactory,
                            isDarkProvider = { IsAreaDark { true } },
                            isDarkProvider = { IsAreaDark { dark } },
                            showPercentMode =
                                if (showBatteryEstimate) ShowPercentMode.PreferEstimate
                                else ShowPercentMode.Always,
@@ -441,10 +443,11 @@ constructor(
                    PlatformTheme {
                        id = R.id.battery_meter_composable_view
                        val showBatteryEstimate by showBatteryEstimate.collectAsStateWithLifecycle()
                        val dark = isSystemInDarkTheme()
                        BatteryWithEstimate(
                            modifier = Modifier.wrapContentSize(),
                            viewModelFactory = unifiedBatteryViewModelFactory,
                            isDarkProvider = { IsAreaDark { true } },
                            isDarkProvider = { IsAreaDark { dark } },
                            textColor =
                                if (notificationShadeBlur()) MaterialTheme.colorScheme.onSurface
                                else Color.White,