OSDN Git Service

Update the strings for "show all apps"
authorjackqdyulei <jackqdyulei@google.com>
Tue, 23 May 2017 21:30:47 +0000 (14:30 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Tue, 23 May 2017 22:17:41 +0000 (15:17 -0700)
Bug: 38328724
Test: Screenshot
Change-Id: If48ff26f691795dcf206346af6a9a0be62bbf733

res/values/strings.xml
src/com/android/settings/fuelgauge/PowerUsageSummary.java

index dc7e567..3bb23d8 100644 (file)
     <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] -->
     <!-- 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>
index b3d07b8..7d0f7e1 100644 (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(