Merge "Remove lock inversion in LegacyVpnRunner" am: 303762dce1 am: 9c14210258
Change-Id: Ib0a04f59b140ae9b64c2fa77ca9326b9addeb16e
This commit is contained in:
@@ -2563,7 +2563,7 @@ public class Vpn {
|
|||||||
public void exitIfOuterInterfaceIs(String interfaze) {
|
public void exitIfOuterInterfaceIs(String interfaze) {
|
||||||
if (interfaze.equals(mOuterInterface)) {
|
if (interfaze.equals(mOuterInterface)) {
|
||||||
Log.i(TAG, "Legacy VPN is going down with " + interfaze);
|
Log.i(TAG, "Legacy VPN is going down with " + interfaze);
|
||||||
exit();
|
exitVpnRunner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2572,6 +2572,10 @@ public class Vpn {
|
|||||||
public void exitVpnRunner() {
|
public void exitVpnRunner() {
|
||||||
// We assume that everything is reset after stopping the daemons.
|
// We assume that everything is reset after stopping the daemons.
|
||||||
interrupt();
|
interrupt();
|
||||||
|
|
||||||
|
// Always disconnect. This may be called again in cleanupVpnStateLocked() if
|
||||||
|
// exitVpnRunner() was called from exit(), but it will be a no-op.
|
||||||
|
agentDisconnect();
|
||||||
try {
|
try {
|
||||||
mContext.unregisterReceiver(mBroadcastReceiver);
|
mContext.unregisterReceiver(mBroadcastReceiver);
|
||||||
} catch (IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
@@ -2794,7 +2798,7 @@ public class Vpn {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i(TAG, "Aborting", e);
|
Log.i(TAG, "Aborting", e);
|
||||||
updateState(DetailedState.FAILED, e.getMessage());
|
updateState(DetailedState.FAILED, e.getMessage());
|
||||||
exit();
|
exitVpnRunner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user