Skip to content

Commit 9226fc3

Browse files
author
lucaslin
committed
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
1 parent dcc3d1d commit 9226fc3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/core/java/com/android/server/connectivity

services/core/java/com/android/server/connectivity/Vpn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ public void onUserRemoved(int userHandle) {
11381138
*/
11391139
public synchronized void onUserStopped() {
11401140
// Switch off networking lockdown (if it was enabled)
1141-
setLockdown(false);
1141+
setVpnForcedLocked(false);
11421142
mAlwaysOn = false;
11431143

11441144
unregisterPackageChangeReceiverLocked();

0 commit comments

Comments
 (0)