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
This commit is contained in:
Jim Miller
2015-06-16 16:21:27 -07:00
parent a4f8aae4be
commit 50d7d19a73
2 changed files with 9 additions and 2 deletions

View File

@@ -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]));
}