VPN settings: add missing string resource

Previously, a string resource was deleted by mistake in commit
cce4e61260. This bug went uncaught by
local and presubmit build checks. We add the missing string back to
strings.xml to fix the build. The affected string is referenced in
ManageablePreference.java.

Apologies for any inconvenience.

Test: make SettingsRoboTests; manually navigate through VPN settings
Bug: 36815998
Change-Id: Ibc2ef9ad43cad73ef5f078714faf5c52bc7198c6
This commit is contained in:
Charles He
2017-04-01 18:52:25 +01:00
parent 5569816021
commit 1b5015cae6
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>
<!-- 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>
<!-- 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
go through VPN. [CHAR LIMIT=40] -->
<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);
String summary = (mState == STATE_NONE ? "" : states[mState]);
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(
R.string.join_two_unrelated_items, summary, alwaysOnString);
}