VPN settings: update strings for always-on VPN

To conform with UX guidelines and conventions, the following changes are
made to the UI of app VPN's PreferenceFragment:
(1. Always-on toggle title stays the same)
2. Always-on toggle subtext changes from "active"/"inactive" to an
explanation of the feature
3. Lockdown toggle title is shortened
4. Lockdown toggle subtext is removed completely

And the following changes are made to the legacy VPN's ConfigDialog:
5. Error message that is displayed below the "Always-on VPN" checkbox
6. Replacing \u2019 with \'

Bug: 36382729
Test: manually navigate through VPN settings
Test: make SettingsRoboTests
Change-Id: If1b4faec8743dfbf6e3f8062b53190ad63700d25
This commit is contained in:
Charles He
2017-03-24 14:03:55 +00:00
parent bc8285793a
commit cce4e61260
3 changed files with 32 additions and 29 deletions

View File

@@ -259,13 +259,13 @@ public class AppManagementFragment extends SettingsPreferenceFragment
if (isAlwaysOnSupportedByApp(mPackageInfo.applicationInfo)) {
// setSummary doesn't override the admin message when user restriction is applied
mPreferenceAlwaysOn.setSummary(null);
mPreferenceAlwaysOn.setSummary(R.string.vpn_always_on_summary);
// setEnabled is not required here, as checkRestrictionAndSetDisabled
// should have refreshed the enable state.
} else {
mPreferenceAlwaysOn.setEnabled(false);
mPreferenceLockdown.setEnabled(false);
mPreferenceAlwaysOn.setSummary(R.string.vpn_not_supported_by_this_app);
mPreferenceAlwaysOn.setSummary(R.string.vpn_always_on_summary_not_supported);
}
}
}