Update strings for ignore optimizations control

Bug: 19991702
Change-Id: Ie5b54fd70176cfceb8b88cf18a9974321ba84c28
This commit is contained in:
Jason Monk
2015-05-11 15:48:11 -04:00
parent 69a03f7517
commit bcb4f2c913
5 changed files with 26 additions and 25 deletions

View File

@@ -6636,32 +6636,35 @@
<!-- Label for process [CHAR LIMIT=25] -->
<string name="process_format"><xliff:g id="app_name" example="Settings">%1$s</xliff:g> (<xliff:g id="count" example="3">%2$d</xliff:g>)</string>
<!-- Label for whether app is allowed to use a lot ef power [CHAR LIMIT=25]-->
<string name="high_power" translatable="false">High power</string>
<!-- Label for list to control apps that ignore battery saving restrictions [CHAR LIMIT=25]-->
<string name="high_power_apps">Ignore optimizations</string>
<!-- List of apps that are allowed to use a lot of power [CHAR LIMIT=25]-->
<string name="high_power_apps" translatable="false">High power apps</string>
<!-- Filter for apps allowed to use a lot of power [CHAR LIMIT=25] -->
<string name="high_power_filter_on">Allowed</string>
<!-- Summary of app allowed to use a lot of power [CHAR LIMIT=25] -->
<string name="high_power_on">On</string>
<!-- Filter for apps not allowed to use a lot of power [CHAR LIMIT=25] -->
<string name="high_power_filter_off">Not allowed</string>
<!-- Summary of app not allowed to use a lot of power [CHAR LIMIT=25] -->
<string name="high_power_off">Off</string>
<!-- Summary of app allowed to use a lot of power [CHAR LIMIT=60] -->
<string name="high_power_on">Allowed to ignore optimizations</string>
<!-- Summary of app not allowed to use a lot of power [CHAR LIMIT=60] -->
<string name="high_power_off">Not allowed to ignore optimizations</string>
<!-- Description of high power switch [CHAR LIMIT=NONE] -->
<string name="high_power_desc" translatable="false">High powered apps description text goes here. This is a placeholder.</string>
<string name="high_power_desc">Ignore optimizations including Battery saver, allow instant content refresh etc.</string>
<!-- Description of number of apps with high power turned on [CHAR LIMIT=NONE] -->
<plurals name="high_power_count" translatable="false">
<item quantity="one">1 app is allowed to ignore restrictions like battery saver mode, sync etc.</item>
<item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> apps is allowed to ignore restrictions like battery saver mode, sync etc.</item>
<plurals name="high_power_count">
<item quantity="one">1 app is allowed to ignore battery optimizations</item>
<item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> apps are allowed to battery optimizations</item>
</plurals>
<!-- Summary of power usage for an app [CHAR LIMIT=NONE] -->
<string name="battery_summary" translatable="false"><xliff:g id="percentage" example="2">%1$d</xliff:g>%% use since last full charge</string>
<string name="battery_summary"><xliff:g id="percentage" example="2">%1$d</xliff:g>%% use since last full charge</string>
<!-- Summary for app with no battery usage [CHAR LIMIT=NONE] -->
<string name="no_battery_summary" translatable="false">No battery use since last full charge</string>
<string name="no_battery_summary">No battery use since last full charge</string>
<!-- Link to an apps notification settings [CHAR LIMIT=50] -->
<string name="app_notification_preferences">App notification preferences</string>

View File

@@ -16,14 +16,11 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/high_power">
android:title="@string/high_power_apps">
<SwitchPreference
android:key="high_power_switch"
android:title="@string/high_power" />
<Preference
android:summary="@string/high_power_desc"
android:selectable="false" />
android:title="@string/high_power_apps" />
</PreferenceScreen>

View File

@@ -27,7 +27,7 @@
<Preference
android:key="high_power"
android:title="@string/high_power" />
android:title="@string/high_power_apps" />
<PreferenceCategory
android:key="details_parent"

View File

@@ -136,8 +136,8 @@ public class ManageApplications extends InstrumentedFragment
R.string.filter_work_apps, // Work
R.string.filter_with_domain_urls_apps, // Domain URLs
R.string.filter_all_apps, // Usage access screen, never displayed
R.string.high_power_on, // High power whitelist, on
R.string.high_power_off, // High power whitelist, off
R.string.high_power_filter_on, // High power whitelist, on
R.string.high_power_filter_off, // High power whitelist, off
};
// This is the actual mapping to filters from FILTER_ constants above, the order must
// be kept in sync.
@@ -444,7 +444,7 @@ public class ManageApplications extends InstrumentedFragment
startAppInfoFragment(AppStorageSettings.class, R.string.storage_settings);
break;
case LIST_TYPE_HIGH_POWER:
startAppInfoFragment(HighPowerDetail.class, R.string.high_power);
startAppInfoFragment(HighPowerDetail.class, R.string.high_power_apps);
break;
// TODO: Figure out if there is a way where we can spin up the profile's settings
// process ahead of time, to avoid a long load of data when user clicks on a managed app.

View File

@@ -414,8 +414,9 @@ public class PowerUsageDetail extends PowerUsageBase implements Button.OnClickLi
mHighPower.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
AppInfoBase.startAppInfoFragment(HighPowerDetail.class, R.string.high_power,
mApp.packageName, mApp.uid, PowerUsageDetail.this, 0);
AppInfoBase.startAppInfoFragment(HighPowerDetail.class,
R.string.high_power_apps, mApp.packageName, mApp.uid,
PowerUsageDetail.this, 0);
return true;
}
});