VPN settings: add missing string resource

am: 1b5015cae6

Change-Id: I02c4ebe3d03cf4cd10c7d7803532433d519ff4e2
This commit is contained in:
Charles He
2017-04-01 20:47:57 +00:00
committed by android-build-merger
2 changed files with 3 additions and 1 deletions

View File

@@ -5656,6 +5656,8 @@
<string name="vpn_always_on_summary">Stay connected to VPN at all times</string> <string name="vpn_always_on_summary">Stay connected to VPN at all times</string>
<!-- Preference summary for app not supporting always-on VPN [CHAR LIMIT=40] --> <!-- Preference summary for app not supporting always-on VPN [CHAR LIMIT=40] -->
<string name="vpn_always_on_summary_not_supported">Not supported by this app</string> <string name="vpn_always_on_summary_not_supported">Not supported by this app</string>
<!-- Preference summary for a VPN app that is set to be always-on. [CHAR LIMIT=40] -->
<string name="vpn_always_on_summary_active">Always-on active</string>
<!-- Preference title for the toggle that controls whether to force all network connections to <!-- Preference title for the toggle that controls whether to force all network connections to
go through VPN. [CHAR LIMIT=40] --> go through VPN. [CHAR LIMIT=40] -->
<string name="vpn_require_connection">Block connections without VPN</string> <string name="vpn_require_connection">Block connections without VPN</string>

View File

@@ -87,7 +87,7 @@ public abstract class ManageablePreference extends GearPreference {
final String[] states = res.getStringArray(R.array.vpn_states); final String[] states = res.getStringArray(R.array.vpn_states);
String summary = (mState == STATE_NONE ? "" : states[mState]); String summary = (mState == STATE_NONE ? "" : states[mState]);
if (mIsAlwaysOn) { if (mIsAlwaysOn) {
final String alwaysOnString = res.getString(R.string.vpn_always_on_active); final String alwaysOnString = res.getString(R.string.vpn_always_on_summary_active);
summary = TextUtils.isEmpty(summary) ? alwaysOnString : res.getString( summary = TextUtils.isEmpty(summary) ? alwaysOnString : res.getString(
R.string.join_two_unrelated_items, summary, alwaysOnString); R.string.join_two_unrelated_items, summary, alwaysOnString);
} }