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

Commit 67dfdbc9 authored by Chiachang Wang's avatar Chiachang Wang Committed by Gerrit Code Review
Browse files

Merge "Add TetherConfigParcel to improve startTetheringWithConfiguration"

parents b24e34c1 afd43e48
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import android.net.NetworkStack;
import android.net.NetworkStats;
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.TetherConfigParcel;
import android.net.TetherStatsParcel;
import android.net.UidRange;
import android.net.UidRangeParcel;
@@ -1023,7 +1024,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub {
        NetworkStack.checkNetworkStackPermission(mContext);
        // an odd number of addrs will fail
        try {
            mNetdService.tetherStartWithConfiguration(usingLegacyDnsProxy, dhcpRange);
            final TetherConfigParcel config = new TetherConfigParcel();
            config.usingLegacyDnsProxy = usingLegacyDnsProxy;
            config.dhcpRanges = dhcpRange;
            mNetdService.tetherStartWithConfiguration(config);
        } catch (RemoteException | ServiceSpecificException e) {
            throw new IllegalStateException(e);
        }