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:
@@ -5464,16 +5464,26 @@
|
|||||||
<string name="vpn_no_ca_cert">(don\u2019t verify server)</string>
|
<string name="vpn_no_ca_cert">(don\u2019t verify server)</string>
|
||||||
<!-- Option to use the server certificate received from the VPN server. [CHAR LIMIT=40] -->
|
<!-- Option to use the server certificate received from the VPN server. [CHAR LIMIT=40] -->
|
||||||
<string name="vpn_no_server_cert">(received from server)</string>
|
<string name="vpn_no_server_cert">(received from server)</string>
|
||||||
<!-- Reason for Always-on VPN checkbox being disabled: the selected VPN type doesn't support always-on. [CHAR LIMIT=120] -->
|
<!-- Error message displayed below the always-on VPN checkbox when the checkbox is disabled:
|
||||||
<string name="vpn_always_on_invalid_reason_type">The selected VPN type can\u2019t be always on</string>
|
the selected VPN type doesn't support always-on. [CHAR LIMIT=120] -->
|
||||||
<!-- Reason for Always-on VPN checkbox being disabled: the server address is invalid. [CHAR LIMIT=120] -->
|
<string name="vpn_always_on_invalid_reason_type">This VPN type can\'t stay connected at all
|
||||||
<string name="vpn_always_on_invalid_reason_server">Always-on VPN only supports numeric server addresses</string>
|
times</string>
|
||||||
<!-- Reason for Always-on VPN checkbox being disabled: no DNS is found. [CHAR LIMIT=120] -->
|
<!-- Error message displayed below the always-on VPN checkbox when the checkbox is disabled:
|
||||||
<string name="vpn_always_on_invalid_reason_no_dns">A DNS server must be specified for always-on VPN</string>
|
the server address is not in numeric form (e.g. 8.8.8.8). [CHAR LIMIT=120] -->
|
||||||
<!-- Reason for Always-on VPN checkbox being disabled: DNS server addresses are invalid. [CHAR LIMIT=120] -->
|
<string name="vpn_always_on_invalid_reason_server">Always-on VPN only supports numeric server
|
||||||
<string name="vpn_always_on_invalid_reason_dns">DNS server addresses must be numeric for always-on VPN</string>
|
addresses</string>
|
||||||
<!-- Reason for Always-on VPN checkbox being disabled: generic reason. [CHAR LIMIT=120] -->
|
<!-- Error message displayed below the always-on VPN checkbox when the checkbox is disabled:
|
||||||
<string name="vpn_always_on_invalid_reason_other">The information entered doesn\u2019t support always-on VPN</string>
|
no DNS is found. [CHAR LIMIT=120] -->
|
||||||
|
<string name="vpn_always_on_invalid_reason_no_dns">A DNS server must be specified for always-on
|
||||||
|
VPN</string>
|
||||||
|
<!-- Error message displayed below the always-on VPN checkbox when the checkbox is disabled:
|
||||||
|
DNS server addresses are not in numeric form (e.g. 8.8.8.8). [CHAR LIMIT=120] -->
|
||||||
|
<string name="vpn_always_on_invalid_reason_dns">DNS server addresses must be numeric for
|
||||||
|
always-on VPN</string>
|
||||||
|
<!-- Error message displayed below the always-on VPN checkbox when the checkbox is disabled:
|
||||||
|
generic error. [CHAR LIMIT=120] -->
|
||||||
|
<string name="vpn_always_on_invalid_reason_other">The information entered doesn\'t support
|
||||||
|
always-on VPN</string>
|
||||||
|
|
||||||
<!-- Button label to cancel changing a VPN profile. [CHAR LIMIT=40] -->
|
<!-- Button label to cancel changing a VPN profile. [CHAR LIMIT=40] -->
|
||||||
<string name="vpn_cancel">Cancel</string>
|
<string name="vpn_cancel">Cancel</string>
|
||||||
@@ -5529,20 +5539,16 @@
|
|||||||
<string name="vpn_menu_lockdown">Always-on VPN</string>
|
<string name="vpn_menu_lockdown">Always-on VPN</string>
|
||||||
<!-- Placeholder when VPN settings is open but no VPNs have been created. [CHAR LIMIT=100] -->
|
<!-- Placeholder when VPN settings is open but no VPNs have been created. [CHAR LIMIT=100] -->
|
||||||
<string name="vpn_no_vpns_added">No VPNs added</string>
|
<string name="vpn_no_vpns_added">No VPNs added</string>
|
||||||
<!-- Preference summary for active always-on vpn [CHAR LIMIT=40] -->
|
<!-- Preference summary for always-on VPN checkbox. [CHAR LIMIT=40] -->
|
||||||
<string name="vpn_always_on_active">Always-on active</string>
|
<string name="vpn_always_on_summary">Stay connected to VPN at all times</string>
|
||||||
<!-- Preference summary for inactive always-on vpn [CHAR LIMIT=40] -->
|
<!-- Preference summary for app not supporting always-on VPN [CHAR LIMIT=40] -->
|
||||||
<string name="vpn_always_on_inactive">Always-on inactive</string>
|
<string name="vpn_always_on_summary_not_supported">Not supported by this app</string>
|
||||||
<!-- Preference summary for app not supporting always-on vpn [CHAR LIMIT=NONE] -->
|
<!-- Preference title for the toggle that controls whether to force all network connections to
|
||||||
<string name="vpn_not_supported_by_this_app">Not supported by this app</string>
|
go through VPN. [CHAR LIMIT=40] -->
|
||||||
<!-- Preference title for forcing all network connections to go through VPN. -->
|
<string name="vpn_require_connection">Block connections without VPN</string>
|
||||||
<string name="vpn_require_connection">Only allow connections through VPN</string>
|
<!-- Dialog message title to confirm forcing all network connections to go through VPN.
|
||||||
<!-- Dialog message title to confirm forcing all network connections to go through VPN. [CHAR LIMIT=40] -->
|
[CHAR LIMIT=40] -->
|
||||||
<string name="vpn_require_connection_title">Require VPN connection?</string>
|
<string name="vpn_require_connection_title">Require VPN connection?</string>
|
||||||
<!-- Preference summary when the preference to force all network connections to go through a VPN is enabled, blocking all other network traffic. In this case apps must use the VPN for all connections. -->
|
|
||||||
<string name="vpn_lockdown_active">Lockdown active</string>
|
|
||||||
<!-- Preference summary when the preference to force all network connections to go through a VPN is disabled. In this case use of the VPN is optional for apps. -->
|
|
||||||
<string name="vpn_lockdown_inactive">Lockdown inactive</string>
|
|
||||||
|
|
||||||
<!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
|
<!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
|
||||||
<string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
|
<string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
|
||||||
|
@@ -27,8 +27,7 @@
|
|||||||
android:key="always_on_vpn"
|
android:key="always_on_vpn"
|
||||||
android:title="@string/vpn_menu_lockdown"
|
android:title="@string/vpn_menu_lockdown"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:summaryOn="@string/vpn_always_on_active"
|
android:summary="@string/vpn_always_on_summary"
|
||||||
android:summaryOff="@string/vpn_always_on_inactive"
|
|
||||||
settings:userRestriction="no_config_vpn"
|
settings:userRestriction="no_config_vpn"
|
||||||
settings:useAdditionalSummary="true"
|
settings:useAdditionalSummary="true"
|
||||||
settings:restrictedSwitchSummary="@string/disabled_by_admin_summary_text" />
|
settings:restrictedSwitchSummary="@string/disabled_by_admin_summary_text" />
|
||||||
@@ -37,8 +36,6 @@
|
|||||||
android:key="lockdown_vpn"
|
android:key="lockdown_vpn"
|
||||||
android:title="@string/vpn_require_connection"
|
android:title="@string/vpn_require_connection"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:summaryOn="@string/vpn_lockdown_active"
|
|
||||||
android:summaryOff="@string/vpn_lockdown_inactive"
|
|
||||||
android:dependency="always_on_vpn"
|
android:dependency="always_on_vpn"
|
||||||
settings:userRestriction="no_config_vpn"
|
settings:userRestriction="no_config_vpn"
|
||||||
settings:useAdditionalSummary="true"
|
settings:useAdditionalSummary="true"
|
||||||
|
@@ -259,13 +259,13 @@ public class AppManagementFragment extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
if (isAlwaysOnSupportedByApp(mPackageInfo.applicationInfo)) {
|
if (isAlwaysOnSupportedByApp(mPackageInfo.applicationInfo)) {
|
||||||
// setSummary doesn't override the admin message when user restriction is applied
|
// 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
|
// setEnabled is not required here, as checkRestrictionAndSetDisabled
|
||||||
// should have refreshed the enable state.
|
// should have refreshed the enable state.
|
||||||
} else {
|
} else {
|
||||||
mPreferenceAlwaysOn.setEnabled(false);
|
mPreferenceAlwaysOn.setEnabled(false);
|
||||||
mPreferenceLockdown.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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user