OSDN Git Service

Update battery strings
authorLei Yu <jackqdyulei@google.com>
Wed, 28 Mar 2018 20:32:42 +0000 (13:32 -0700)
committerLei Yu <jackqdyulei@google.com>
Wed, 28 Mar 2018 21:53:01 +0000 (14:53 -0700)
1. restriction strings in App Info page
2. restriction strings in Dialog
3. restriction summary

Bug: 73018395
Test: RunSettingsRoboTests
Change-Id: I35f45f2923cda6380c4498ebb9e0923e6f92e46a

res/values/strings.xml
tests/robotests/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/batterysaver/AutoBatterySeekBarPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryManagerPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragmentTest.java

index 2d530ee..696e9bb 100644 (file)
     <string name="power_charge_remaining"><xliff:g id="until_charged">%1$s</xliff:g> to charge</string>
 
     <!-- Title for the background activity setting, which allows a user to control whether an app can run in the background [CHAR_LIMIT=40] -->
-    <string name="background_activity_title">Battery restrictions</string>
+    <string name="background_activity_title">Background restriction</string>
     <!-- Summary for the background activity [CHAR_LIMIT=120] -->
     <string name="background_activity_summary">Allow the app to run in the background</string>
     <!-- Summary for the background activity when it is on [CHAR_LIMIT=120] -->
     <!-- Summary for the background activity when it is disabled [CHAR_LIMIT=120] -->
     <string name="background_activity_summary_disabled">App not allowed to run in background</string>
     <!-- TODO: Pending UX review. Summary for the background activity when it is whitlisted [CHAR_LIMIT=120] -->
-    <string name="background_activity_summary_whitelisted">App can not be optimized for battery use</string>
+    <string name="background_activity_summary_whitelisted">Background usage can\u2019t be restricted</string>
     <!-- TODO: Pending UX review. Title for the warning dialog to show to the user when limiting background activity for an app -->
     <string name="background_activity_warning_dialog_title">Limit background activity?</string>
     <!-- TODO: Pending UX review. Text for the warning dialog to show to the user when limiting background activity for an app -->
         <item quantity="other">Restrict %1$d apps?</item>
     </plurals>
     <!-- Message for battery tip dialog to show the info to restrict the app [CHAR LIMIT=NONE] -->
-    <string name="battery_tip_restrict_app_dialog_message">To save battery, stop <xliff:g id="app">%1$s</xliff:g> from using battery in the background.</string>
+    <string name="battery_tip_restrict_app_dialog_message">To save battery, stop <xliff:g id="app">%1$s</xliff:g> from using battery in the background. This app may not work properly and notifications may be delayed.</string>
     <!-- Message for battery tip dialog to show the info to restrict the app, below it app list will be shown as a view [CHAR LIMIT=NONE] -->
-    <string name="battery_tip_restrict_apps_less_than_5_dialog_message">To save battery, stop these apps from using battery in the background.\n\nApps:\n</string>
+    <string name="battery_tip_restrict_apps_less_than_5_dialog_message">To save battery, stop these apps from using battery in the background. Restricted apps may not work properly and notifications may be delayed.\n\nApps:\n</string>
     <!-- Message for battery tip dialog to show the info to restrict the app, below it app list will be shown as raw string[CHAR LIMIT=NONE] -->
-    <string name="battery_tip_restrict_apps_more_than_5_dialog_message">To save battery, stop these apps from using battery in the background.\n\nApps:\n<xliff:g id="app_list">%1$s</xliff:g>.</string>
+    <string name="battery_tip_restrict_apps_more_than_5_dialog_message">To save battery, stop these apps from using battery in the background. Restricted apps may not work properly and notifications may be delayed.\n\nApps:\n<xliff:g id="app_list">%1$s</xliff:g>.</string>
     <!-- OK button for battery tip dialog to show the restrict app list [CHAR LIMIT=NONE] -->
     <string name="battery_tip_restrict_app_dialog_ok">Restrict</string>
     <!-- Title for dialog to remove restriction for the app [CHAR LIMIT=NONE] -->
     <!-- Title for the smart battery toggle [CHAR LIMIT=NONE] -->
     <string name="smart_battery_title">Manage apps automatically</string>
     <!-- Summary for the smart battery toggle [CHAR LIMIT=NONE] -->
-    <string name="smart_battery_summary">Limit battery for infrequently used apps and apps that consume battery</string>
+    <string name="smart_battery_summary">Limit battery for apps that you don\u2019t use often</string>
     <!-- Footer for the aosp smart battery page -->
-    <string name="smart_battery_footer">Battery Manager prevents apps from consuming battery when you aren\’t using them</string>
+    <string name="smart_battery_footer" product="default">When Battery Manager detects that apps are draining battery, you\u2019ll have the option to restrict these apps. Restricted apps may not work properly and notifications may be delayed.</string>
+    <!-- Footer for the aosp smart battery page -->
+    <string name="smart_battery_footer" product="tablet">When Battery Manager detects that apps are draining battery, you\u2019ll have the option to restrict these apps. Restricted apps may not work properly and notifications may be delayed.</string>
+    <!-- Footer for the aosp smart battery page -->
+    <string name="smart_battery_footer" product="device">When Battery Manager detects that apps are draining battery, you\u2019ll have the option to restrict these apps. Restricted apps may not work properly and notifications may be delayed.</string>
     <!-- Title for restricted app preference, clicking it will goes to restricted app list [CHAR LIMIT=NONE] -->
     <string name="restricted_app_title">Restricted apps</string>
     <!-- Summary for restricted app preference, clicking it will goes to restricted app list [CHAR LIMIT=NONE] -->
     <plurals name="restricted_app_summary">
-        <item quantity="one">%1$d app</item>
-        <item quantity="other">%1$d apps</item>
+        <item quantity="one">Limiting battery usage for %1$d app</item>
+        <item quantity="other">Limiting battery usage for %1$d apps</item>
     </plurals>
 
     <!-- Footer message for restrict app details page -->
     <string name="restricted_app_detail_footer">Apps shown here aren\'t behaving properly and have been using battery in the background.\n\nThese apps are now blocked from using battery in the background. As a result, some app notifications may be delayed.</string>
 
     <!-- Title for auto restriction toggle -->
-    <string name="battery_auto_restriction_title">Restrict apps automatically</string>
+    <string name="battery_auto_restriction_title">Use Battery Manager</string>
     <!-- Summary for auto restriction toggle -->
-    <string name="battery_auto_restriction_summary">Prevent apps from using extra battery in the background</string>
+    <string name="battery_auto_restriction_summary">Detect when apps drain battery</string>
 
     <!-- Summary for battery manager when it is on -->
-    <string name="battery_manager_on">On / Restricting apps automatically</string>
+    <string name="battery_manager_on">On / Detecting when apps drain battery</string>
     <!-- Summary for battery manager when it is off -->
     <string name="battery_manager_off">Off</string>
     <!-- Summary for battery manager, showing app restricted -->
     <string name="battery_saver_auto_title">Turn on automatically</string>
 
     <!-- Battery saver: Label for seekbar to change battery saver threshold [CHAR_LIMIT=40] -->
-    <string name="battery_saver_seekbar_title">Turn on at <xliff:g id="percent">%1$s</xliff:g></string>
+    <string name="battery_saver_seekbar_title">At <xliff:g id="percent">%1$s</xliff:g></string>
 
     <!-- Battery saver: Placeholder label for seekbar to change battery saver threshold [CHAR_LIMIT=40] -->
     <string name="battery_saver_seekbar_title_placeholder">Turn on</string>
     <string name="encryption_interstitial_no">No</string>
 
     <!-- Label to say yes to the question of whether app is restricted. [CHAR LIMIT=20] -->
-    <string name="restricted_true_label">On / Background usage restricted</string>
+    <string name="restricted_true_label">App can\u2019t use battery in background</string>
     <!-- Label to say no to the question of whether app is restricted. [CHAR LIMIT=20] -->
-    <string name="restricted_false_label">Off / Uses battery in background</string>
+    <string name="restricted_false_label">App can use battery in background</string>
 
     <!-- Title for encryption dialog that disables TalkBack. [CHAR_LIMIT=25] -->
     <string name="encrypt_talkback_dialog_require_pin">Require PIN?</string>
index 9deec6b..9cd4b8e 100644 (file)
@@ -174,7 +174,7 @@ public class BackgroundActivityPreferenceControllerTest {
 
         mController.updateSummary(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("Off / Uses battery in background");
+        assertThat(mPreference.getSummary()).isEqualTo("App can use battery in background");
     }
 
     @Test
@@ -184,7 +184,7 @@ public class BackgroundActivityPreferenceControllerTest {
 
         mController.updateSummary(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("On / Background usage restricted");
+        assertThat(mPreference.getSummary()).isEqualTo("App can\u2019t use battery in background");
     }
 
     @Test
index 5fdf649..6a97fe1 100644 (file)
@@ -121,7 +121,7 @@ public class RestrictAppPreferenceControllerTest {
 
         mRestrictAppPreferenceController.updateState(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("1 app");
+        assertThat(mPreference.getSummary()).isEqualTo("Limiting battery usage for 1 app");
     }
 
     @Test
@@ -134,7 +134,7 @@ public class RestrictAppPreferenceControllerTest {
 
         mRestrictAppPreferenceController.updateState(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("2 apps");
+        assertThat(mPreference.getSummary()).isEqualTo("Limiting battery usage for 2 apps");
     }
 
     @Test
@@ -146,7 +146,7 @@ public class RestrictAppPreferenceControllerTest {
 
         mRestrictAppPreferenceController.updateState(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("1 app");
+        assertThat(mPreference.getSummary()).isEqualTo("Limiting battery usage for 1 app");
         assertThat(mRestrictAppPreferenceController.mAppInfos).containsExactly(
                 new AppInfo.Builder()
                         .setUid(RESTRICTED_UID)
index 63b9742..3fb97d5 100644 (file)
@@ -85,7 +85,7 @@ public class AutoBatterySeekBarPreferenceControllerTest {
         mController.updateState(mPreference);
 
         assertThat(mPreference.isVisible()).isTrue();
-        assertThat(mPreference.getTitle()).isEqualTo("Turn on at 20%");
+        assertThat(mPreference.getTitle()).isEqualTo("At 20%");
         assertThat(mPreference.getProgress()).isEqualTo(TRIGGER_LEVEL);
     }
 
index 8b4c017..37c8306 100644 (file)
@@ -76,7 +76,7 @@ public class BatteryManagerPreferenceControllerTest {
 
         mController.updateState(mPreference);
 
-        assertThat(mPreference.getSummary()).isEqualTo("On / Restricting apps automatically");
+        assertThat(mPreference.getSummary()).isEqualTo("On / Detecting when apps drain battery");
     }
 
     @Test
index d32e026..6fc7f2a 100644 (file)
@@ -127,8 +127,9 @@ public class BatteryTipDialogFragmentTest {
 
         assertThat(shadowDialog.getTitle()).isEqualTo("Restrict app?");
         assertThat(shadowDialog.getMessage())
-                .isEqualTo("To save battery, stop app from using "
-                        + "battery in the background.");
+                .isEqualTo(
+                        "To save battery, stop app from using battery in the background. This app"
+                                + " may not work properly and notifications may be delayed.");
     }
 
     @Test
@@ -147,8 +148,10 @@ public class BatteryTipDialogFragmentTest {
 
         assertThat(shadowDialog.getTitle()).isEqualTo("Restrict 2 apps?");
         assertThat(shadowDialog.getMessage())
-                .isEqualTo("To save battery, stop these apps from using battery in the background"
-                        + ".\n\nApps:\n");
+                .isEqualTo(
+                        "To save battery, stop these apps from using battery in the background. "
+                                + "Restricted apps may not work properly and notifications may be"
+                                + " delayed.\n\nApps:\n");
         assertThat(shadowDialog.getView()).isNotNull();
     }
 
@@ -174,8 +177,10 @@ public class BatteryTipDialogFragmentTest {
 
         assertThat(shadowDialog.getTitle()).isEqualTo("Restrict 6 apps?");
         assertThat(shadowDialog.getMessage())
-                .isEqualTo("To save battery, stop these apps from using battery in the background"
-                        + ".\n\nApps:\napp, app, app, app, app, and app.");
+                .isEqualTo(
+                        "To save battery, stop these apps from using battery in the background. "
+                                + "Restricted apps may not work properly and notifications may be"
+                                + " delayed.\n\nApps:\napp, app, app, app, app, and app.");
     }
 
     @Test