Merge "Update the strings for "show all apps"" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-24 00:49:48 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 6 deletions

View File

@@ -4486,6 +4486,8 @@
<string name="power_last_full_charge_summary"><xliff:g id="time">^1</xliff:g> ago</string>
<!-- Label for list of apps using battery in power use UI. Note: ^1 should be used in all translations[CHAR_LIMIT=120] -->
<string name="power_usage_list_summary">App usage since full charge (<xliff:g id="time">^1</xliff:g> ago)</string>
<!-- Label for device components using battery in power use UI. Note: ^1 should be used in all translations[CHAR_LIMIT=120] -->
<string name="power_usage_list_summary_device">Device usage since full charge (<xliff:g id="time">^1</xliff:g> ago)</string>
<!-- Description for the screen usage item [CHAR_LIMIT=120] -->
<string name="screen_usage_summary">Amount of time screen has been on since full charge</string>
<!-- Label for list of different types using battery in power use UI [CHAR_LIMIT=60] -->
@@ -7399,11 +7401,11 @@
<!-- Label for menu to launch a screen showing usage alerts for battery [CHAR LIMIT=30] -->
<string name="additional_battery_info">Usage alerts</string>
<!-- Label for menu to show all apps in battery settings [CHAR LIMIT=30] -->
<string name="show_all_apps">Show all apps</string>
<!-- Label for menu to show battery usage in the device [CHAR LIMIT=45] -->
<string name="show_all_apps">Show full device usage</string>
<!-- Label for menu to hide extra apps in battery settings [CHAR LIMIT=30] -->
<string name="hide_extra_apps">Hide extra apps</string>
<!-- Label for menu to show app usage [CHAR LIMIT=30] -->
<string name="hide_extra_apps">Show app usage</string>
<!-- Filter for apps allowed to use a lot of power [CHAR LIMIT=25] -->
<string name="high_power_filter_on">Not optimized</string>

View File

@@ -429,8 +429,9 @@ public class PowerUsageSummary extends PowerUsageBase {
updateLastFullChargePreference(runningTime);
final CharSequence timeSequence = Utils.formatElapsedTime(context, runningTime, false);
mAppListGroup.setTitle(
TextUtils.expandTemplate(getText(R.string.power_usage_list_summary), timeSequence));
final int resId = mShowAllApps ? R.string.power_usage_list_summary_device
: R.string.power_usage_list_summary;
mAppListGroup.setTitle(TextUtils.expandTemplate(getText(resId), timeSequence));
if (averagePower >= MIN_AVERAGE_POWER_THRESHOLD_MILLI_AMP || USE_FAKE_DATA) {
final List<BatterySipper> usageList = getCoalescedUsageList(