From 89ca8b306368ddc5afbe0d3cf0dff8b8b3918732 Mon Sep 17 00:00:00 2001 From: chiachangwang Date: Thu, 30 Jun 2022 01:48:45 +0000 Subject: [PATCH] Update the prefix in keystore for app exclusion Update the string without the underscore to prevent conflict with the existing VPN prefix. Settings app may get exception when the vpn exclusion list was set since the logic is used in the Settings relying on the prefix match. The current app exclusion prefix is also started with "VPN_", so it will be mis-used by Settings as a VPN profile. Bug: 237345836 Test: atest FrameworksNetTests Change-Id: I01e773cc15eb1ae5ffaa12aef124bbbf390cc004 --- services/core/java/com/android/server/connectivity/Vpn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index 4e5ce8ae45e4c..50b6d77cfd5c2 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -186,7 +186,7 @@ public class Vpn { private static final boolean LOGD = true; private static final String ANDROID_KEYSTORE_PROVIDER = "AndroidKeyStore"; /** Key containing prefix of vpn app excluded list */ - @VisibleForTesting static final String VPN_APP_EXCLUDED = "VPN_APP_EXCLUDED_"; + @VisibleForTesting static final String VPN_APP_EXCLUDED = "VPNAPPEXCLUDED_"; // Length of time (in milliseconds) that an app hosting an always-on VPN is placed on // the device idle allowlist during service launch and VPN bootstrap.