Merge "Updates battery usage messages from last 24hr to last full charge. (Part1: V2 files)"
This commit is contained in:
committed by
Android (Google) Code Review
commit
bc52343473
@@ -6438,8 +6438,12 @@
|
||||
|
||||
<!-- [CHAR_LIMIT=NONE] Battery usage main screen chart graph hint -->
|
||||
<string name="battery_usage_chart_graph_hint">Battery level for past 24 hr</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Battery app usage section header since last full charge -->
|
||||
<string name="battery_app_usage">App usage since last full charge</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Battery app usage section header for past 24 hour -->
|
||||
<string name="battery_app_usage_for_past_24">App usage for past 24 hr</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Battery system usage section header since last full charge -->
|
||||
<string name="battery_system_usage">System usage since last full charge</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Battery system usage section header for past 24 hour -->
|
||||
<string name="battery_system_usage_for_past_24">System usage for past 24 hr</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Battery system usage section header -->
|
||||
|
@@ -200,8 +200,7 @@ public class BatteryChartPreferenceControllerV2 extends AbstractPreferenceContro
|
||||
mPrefContext = screen.getContext();
|
||||
mAppListPrefGroup = screen.findPreference(mPreferenceKey);
|
||||
mAppListPrefGroup.setOrderingAsAdded(false);
|
||||
mAppListPrefGroup.setTitle(
|
||||
mPrefContext.getString(R.string.battery_app_usage_for_past_24));
|
||||
mAppListPrefGroup.setTitle(mPrefContext.getString(R.string.battery_app_usage));
|
||||
mFooterPreference = screen.findPreference(KEY_FOOTER_PREF);
|
||||
// Removes footer first until usage data is loaded to avoid flashing.
|
||||
if (mFooterPreference != null) {
|
||||
@@ -498,8 +497,8 @@ public class BatteryChartPreferenceControllerV2 extends AbstractPreferenceContro
|
||||
// Null means we show all information without a specific time slot.
|
||||
if (slotInformation == null) {
|
||||
return isApp
|
||||
? mPrefContext.getString(R.string.battery_app_usage_for_past_24)
|
||||
: mPrefContext.getString(R.string.battery_system_usage_for_past_24);
|
||||
? mPrefContext.getString(R.string.battery_app_usage)
|
||||
: mPrefContext.getString(R.string.battery_system_usage);
|
||||
} else {
|
||||
return isApp
|
||||
? mPrefContext.getString(R.string.battery_app_usage_for, slotInformation)
|
||||
|
@@ -533,13 +533,13 @@ public final class BatteryChartPreferenceControllerV2Test {
|
||||
verify(mBatteryChartPreferenceController.mAppListPrefGroup)
|
||||
.setTitle(captor.capture());
|
||||
assertThat(captor.getValue())
|
||||
.isEqualTo("App usage for past 24 hr");
|
||||
.isEqualTo("App usage since last full charge");
|
||||
// Verifies the title in the expandable divider.
|
||||
captor = ArgumentCaptor.forClass(String.class);
|
||||
verify(mBatteryChartPreferenceController.mExpandDividerPreference)
|
||||
.setTitle(captor.capture());
|
||||
assertThat(captor.getValue())
|
||||
.isEqualTo("System usage for past 24 hr");
|
||||
.isEqualTo("System usage since last full charge");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user