Merge "Update the proper App battery usage string on App info page" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bc67d885ec
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="battery"
|
android:key="battery"
|
||||||
android:title="@string/app_battery_usage_title"
|
android:title="@string/battery_details_title"
|
||||||
android:summary="@string/summary_placeholder" />
|
android:summary="@string/summary_placeholder" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
@@ -54,7 +54,7 @@ fun AppBatteryPreference(app: ApplicationInfo) {
|
|||||||
if (!presenter.isAvailable()) return
|
if (!presenter.isAvailable()) return
|
||||||
|
|
||||||
Preference(object : PreferenceModel {
|
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 summary = presenter.summary
|
||||||
override val enabled = presenter.enabled
|
override val enabled = presenter.enabled
|
||||||
override val onClick = presenter::startActivity
|
override val onClick = presenter::startActivity
|
||||||
|
@@ -101,7 +101,7 @@ class AppBatteryPreferenceTest {
|
|||||||
|
|
||||||
setContent(notInstalledApp)
|
setContent(notInstalledApp)
|
||||||
|
|
||||||
composeTestRule.onNode(hasTextExactly(context.getString(R.string.app_battery_usage_title)))
|
composeTestRule.onNode(hasTextExactly(context.getString(R.string.battery_details_title)))
|
||||||
.assertIsDisplayed()
|
.assertIsDisplayed()
|
||||||
.assertIsNotEnabled()
|
.assertIsNotEnabled()
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ class AppBatteryPreferenceTest {
|
|||||||
|
|
||||||
composeTestRule.onNode(
|
composeTestRule.onNode(
|
||||||
hasTextExactly(
|
hasTextExactly(
|
||||||
context.getString(R.string.app_battery_usage_title),
|
context.getString(R.string.battery_details_title),
|
||||||
context.getString(R.string.no_battery_summary),
|
context.getString(R.string.no_battery_summary),
|
||||||
),
|
),
|
||||||
).assertIsDisplayed().assertIsEnabled()
|
).assertIsDisplayed().assertIsEnabled()
|
||||||
|
Reference in New Issue
Block a user