From 7f96c4c84813c234bfad79a6fb0cd190feedbbba Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Thu, 16 Feb 2017 17:48:41 +0000 Subject: [PATCH] Update string: lockdown confirmation dialog title The most common string shown previously was: "Set always-on VPN?" It's now a different string: "Only allow connections through VPN?" This makes more sense because the only way to get to this dialog in stock Settings is by first enabling a specific VPN and afterwards trying to set the same VPN to lockdown mode. In this case the prompt should specifically refer to lockdown, not having a VPN connection in general (because the user clearly already has one). Test: m Settings -j20, install a VPN, connect to it, open Settings > Network > Vpn > {VPN name} and select 'only allow connections through VPN'. Verify the title is now the one referred to in the commit message. Fix: 34491069 Change-Id: Ic74a8b91eb8ae64fbe15723c173281f4ede52b06 --- res/values/strings.xml | 2 ++ src/com/android/settings/vpn2/ConfirmLockdownFragment.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 9610af97ee4..3e3cf142cd5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5411,6 +5411,8 @@ Not supported by this app Only allow connections through VPN + + Require VPN connection? Lockdown active diff --git a/src/com/android/settings/vpn2/ConfirmLockdownFragment.java b/src/com/android/settings/vpn2/ConfirmLockdownFragment.java index 0d40e4c1517..2e0914ed4e3 100644 --- a/src/com/android/settings/vpn2/ConfirmLockdownFragment.java +++ b/src/com/android/settings/vpn2/ConfirmLockdownFragment.java @@ -78,7 +78,8 @@ public class ConfirmLockdownFragment extends InstrumentedDialogFragment final boolean wasLockdown = getArguments().getBoolean(ARG_LOCKDOWN_SRC); final boolean nowLockdown = getArguments().getBoolean(ARG_LOCKDOWN_DST); - final int titleId = replacing ? R.string.vpn_replace_vpn_title : R.string.vpn_set_vpn_title; + final int titleId = (nowLockdown ? R.string.vpn_require_connection_title : + (replacing ? R.string.vpn_replace_vpn_title : R.string.vpn_set_vpn_title)); final int actionId = (replacing ? R.string.vpn_replace : (nowLockdown ? R.string.vpn_turn_on : R.string.okay));