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

Commit b61ef534 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove reference of getActiveLinkproperties" into sc-dev

parents 177d8e36 1bb3f75b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -352,7 +352,10 @@ public class VpnManagerService extends IVpnManager.Stub {
    @Override
    public void startLegacyVpn(VpnProfile profile) {
        int user = UserHandle.getUserId(mDeps.getCallingUid());
        final LinkProperties egress = mCm.getActiveLinkProperties();
        // Note that if the caller is not system (uid >= Process.FIRST_APPLICATION_UID),
        // the code might not work well since getActiveNetwork might return null if the uid is
        // blocked by NetworkPolicyManagerService.
        final LinkProperties egress = mCm.getLinkProperties(mCm.getActiveNetwork());
        if (egress == null) {
            throw new IllegalStateException("Missing active network connection");
        }