Loading res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -7176,9 +7176,9 @@ <!-- 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> <string name="vpn_always_on_summary_active">Always on</string> <!-- Preference summary for a VPN app that has an insecure type. [CHAR LIMIT=40] --> <string name="vpn_insecure_summary">not secure VPN</string> <string name="vpn_insecure_summary">Not secure</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> src/com/android/settings/vpn2/ManageablePreference.java +6 −7 Original line number Diff line number Diff line Loading @@ -107,21 +107,20 @@ public abstract class ManageablePreference extends GearPreference { final Resources res = getContext().getResources(); 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_summary_active); summary = TextUtils.isEmpty(summary) ? alwaysOnString : res.getString( R.string.join_two_unrelated_items, summary, alwaysOnString); } if (mIsInsecureVpn) { final String insecureString = res.getString(R.string.vpn_insecure_summary); summary = TextUtils.isEmpty(summary) ? insecureString : res.getString( R.string.join_two_unrelated_items, summary, insecureString); summary = TextUtils.isEmpty(summary) ? insecureString : summary + " / " + insecureString; SpannableString summarySpan = new SpannableString(summary); final int colorError = Utils.getColorErrorDefaultColor(getContext()); summarySpan.setSpan(new ForegroundColorSpan(colorError), 0, summary.length(), SPAN_EXCLUSIVE_INCLUSIVE); setSummary(summarySpan); } else if (mIsAlwaysOn) { final String alwaysOnString = res.getString(R.string.vpn_always_on_summary_active); summary = TextUtils.isEmpty(summary) ? alwaysOnString : summary + " / " + alwaysOnString; } else { setSummary(summary); } Loading Loading
res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -7176,9 +7176,9 @@ <!-- 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> <string name="vpn_always_on_summary_active">Always on</string> <!-- Preference summary for a VPN app that has an insecure type. [CHAR LIMIT=40] --> <string name="vpn_insecure_summary">not secure VPN</string> <string name="vpn_insecure_summary">Not secure</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>
src/com/android/settings/vpn2/ManageablePreference.java +6 −7 Original line number Diff line number Diff line Loading @@ -107,21 +107,20 @@ public abstract class ManageablePreference extends GearPreference { final Resources res = getContext().getResources(); 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_summary_active); summary = TextUtils.isEmpty(summary) ? alwaysOnString : res.getString( R.string.join_two_unrelated_items, summary, alwaysOnString); } if (mIsInsecureVpn) { final String insecureString = res.getString(R.string.vpn_insecure_summary); summary = TextUtils.isEmpty(summary) ? insecureString : res.getString( R.string.join_two_unrelated_items, summary, insecureString); summary = TextUtils.isEmpty(summary) ? insecureString : summary + " / " + insecureString; SpannableString summarySpan = new SpannableString(summary); final int colorError = Utils.getColorErrorDefaultColor(getContext()); summarySpan.setSpan(new ForegroundColorSpan(colorError), 0, summary.length(), SPAN_EXCLUSIVE_INCLUSIVE); setSummary(summarySpan); } else if (mIsAlwaysOn) { final String alwaysOnString = res.getString(R.string.vpn_always_on_summary_active); summary = TextUtils.isEmpty(summary) ? alwaysOnString : summary + " / " + alwaysOnString; } else { setSummary(summary); } Loading