summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-06-16 16:21:27 -0700
committerJim Miller <jaggies@google.com>2015-06-16 16:21:27 -0700
commit50d7d19a7377df9421b6a0af2d8ecce2dfd32796 (patch)
tree0526614dfd4338845308e9f7ad59894f88feb83d
parenta4f8aae4be4040685f88c79006d2cfee42f96504 (diff)
downloadpackages_apps_Settings-50d7d19a7377df9421b6a0af2d8ecce2dfd32796.zip
packages_apps_Settings-50d7d19a7377df9421b6a0af2d8ecce2dfd32796.tar.gz
packages_apps_Settings-50d7d19a7377df9421b6a0af2d8ecce2dfd32796.tar.bz2
Fix issue with german translation of lock times
The word "immediately" would go into a different place in the sentence than a number so we have to break this into two strings. Fixes bug 21602326 Change-Id: Ie07f1bc84d68bdea8d6f1264dfd18326c2e48df4
-rw-r--r--res/values/strings.xml2
-rw-r--r--src/com/android/settings/SecuritySettings.java9
2 files changed, 9 insertions, 2 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0343a15..5d16211 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -653,6 +653,8 @@
<!-- Security settings screen, setting option summary to change screen timeout -->
<string name="lock_after_timeout_summary"><xliff:g id="timeout_string">%1$s</xliff:g> after sleep</string>
<!-- Security settings screen, setting option summary to change screen timeout, with additional explanation-->
+ <string name="lock_immediately_summary_with_exception">Immediately after sleep, except when kept unlocked by <xliff:g id="trust_agent_name">%1$s</xliff:g></string>
+ <!-- Security settings screen, setting option summary to change screen timeout, with additional explanation-->
<string name="lock_after_timeout_summary_with_exception"><xliff:g id="timeout_string">%1$s</xliff:g> after sleep, except when kept unlocked by <xliff:g id="trust_agent_name">%2$s</xliff:g></string>
<!-- Text shown next to checkbox for showing owner info on LockScreen [CHAR LIMIT=50]-->
<string name="show_owner_info_on_lockscreen_label">Show owner info on lock screen</string>
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 93bf1e0..c967659 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -542,8 +542,13 @@ public class SecuritySettings extends SettingsPreferenceFragment
Preference preference = getPreferenceScreen().findPreference(KEY_TRUST_AGENT);
if (preference != null && preference.getTitle().length() > 0) {
- mLockAfter.setSummary(getString(R.string.lock_after_timeout_summary_with_exception,
- entries[best], preference.getTitle()));
+ if (Long.valueOf(values[best].toString()) == 0) {
+ mLockAfter.setSummary(getString(R.string.lock_immediately_summary_with_exception,
+ preference.getTitle()));
+ } else {
+ mLockAfter.setSummary(getString(R.string.lock_after_timeout_summary_with_exception,
+ entries[best], preference.getTitle()));
+ }
} else {
mLockAfter.setSummary(getString(R.string.lock_after_timeout_summary, entries[best]));
}