Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7cd509c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add synchronized to make sure data correctness" am: e50b18b0 am:...

Merge "Add synchronized to make sure data correctness" am: e50b18b0 am: 055310bc am: 88f5094c am: 99a668c8

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433918

Change-Id: I5754bdb872595922f30135613abeb2930ff1c650
parents f4f7d17b 99a668c8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1130,7 +1130,13 @@ public class Vpn {
        return mNetworkInfo;
    }

    public int getNetId() {
    /**
     * Return netId of current running VPN network.
     *
     * @return a netId if there is a running VPN network or NETID_UNSET if there is no running VPN
     *         network or network is null.
     */
    public synchronized int getNetId() {
        final NetworkAgent agent = mNetworkAgent;
        if (null == agent) return NETID_UNSET;
        final Network network = agent.getNetwork();
@@ -1708,7 +1714,7 @@ public class Vpn {
    /**
     * Return the configuration of the currently running VPN.
     */
    public VpnConfig getVpnConfig() {
    public synchronized VpnConfig getVpnConfig() {
        enforceControlPermission();
        return mConfig;
    }