diff options
author | lucaslin <lucaslin@google.com> | 2020-10-05 20:00:07 +0800 |
---|---|---|
committer | Anis Assi <anisassi@google.com> | 2020-10-08 17:08:37 -0700 |
commit | da1c7a3895b8947c750a77566ab5947dfe072566 (patch) | |
tree | 6ef02ecfec1e0ce82a70324e079824fffe346eb5 | |
parent | 8fe9cc18821992ca88e5c78e451a9839c125475a (diff) | |
download | base-da1c7a3895b8947c750a77566ab5947dfe072566.tar.gz |
Fix storing the wrong value of mLockdown in settingandroid-security-8.1.0_r83
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.java | 2 |
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 d51e1f738659..8adb7f30d857 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -1138,7 +1138,7 @@ public class Vpn { */ public synchronized void onUserStopped() { // Switch off networking lockdown (if it was enabled) - setLockdown(false); + setVpnForcedLocked(false); mAlwaysOn = false; unregisterPackageChangeReceiverLocked(); |