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

Commit 3be454f9 authored by Yanting Yang's avatar Yanting Yang
Browse files

Update the proper App battery usage string on App info page

Bug: 278045681
Test: visual
Change-Id: I4da671615f11554e2cd64f3a801252df5c0ba6f4
parent 2c5359dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@

    <Preference
        android:key="battery"
        android:title="@string/app_battery_usage_title"
        android:title="@string/battery_details_title"
        android:summary="@string/summary_placeholder" />

    <Preference
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ fun AppBatteryPreference(app: ApplicationInfo) {
    if (!presenter.isAvailable()) return

    Preference(object : PreferenceModel {
        override val title = stringResource(R.string.app_battery_usage_title)
        override val title = stringResource(R.string.battery_details_title)
        override val summary = presenter.summary
        override val enabled = presenter.enabled
        override val onClick = presenter::startActivity
+2 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ class AppBatteryPreferenceTest {

        setContent(notInstalledApp)

        composeTestRule.onNode(hasTextExactly(context.getString(R.string.app_battery_usage_title)))
        composeTestRule.onNode(hasTextExactly(context.getString(R.string.battery_details_title)))
            .assertIsDisplayed()
            .assertIsNotEnabled()
    }
@@ -114,7 +114,7 @@ class AppBatteryPreferenceTest {

        composeTestRule.onNode(
            hasTextExactly(
                context.getString(R.string.app_battery_usage_title),
                context.getString(R.string.battery_details_title),
                context.getString(R.string.no_battery_summary),
            ),
        ).assertIsDisplayed().assertIsEnabled()