summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlucaslin <lucaslin@google.com>2020-10-05 20:00:07 +0800
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-13 01:07:29 +0000
commit61b620ad4f773e86c03e0719ae24268babcc62a9 (patch)
tree97996bae7141ee1bcfd4c7c238642b0da410cd88
parenta13cfc03e1030a59de4f4e1a6ced03a72353237f (diff)
downloadbase-61b620ad4f773e86c03e0719ae24268babcc62a9.tar.gz
Fix storing the wrong value of mLockdown in setting
When user is stopped, the Vpn#onUserStopped() will be called and the value of mLockdown will be set to false then store into setting. This is a wrong behavior because user doesn't change it, so for this kind of case, there is no need to store the value of mLockdown in setting. In fact, there is no need to call Vpn#saveAlwaysOnPackage() when user is stopped because there is nothing changed. Bug: 168500792 Test: atest FrameworksNetTests Change-Id: Ie85a347216614b7873bfdf199165d89527ada3a8 (cherry picked from commit 9226fc3723a477751705011cd7eecf063b1c3707)
-rw-r--r--services/core/java/com/android/server/connectivity/Vpn.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 347beab0c42f..bcb17bc9e2dc 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -1601,7 +1601,7 @@ public class Vpn {
*/
public synchronized void onUserStopped() {
// Switch off networking lockdown (if it was enabled)
- setLockdown(false);
+ setVpnForcedLocked(false);
mAlwaysOn = false;
// Quit any active connections