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

Commit a3ddee80 authored by Luke Huang's avatar Luke Huang Committed by android-build-merger
Browse files

Merge "Support enable/disable dns forwarding of dnsmasq when start tethering"

am: 6fecb942

Change-Id: I8f5c67fa1e045c9fd4a5e7a753df285d1111c1d2
parents b2d0c635 6fecb942
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -149,6 +149,14 @@ interface INetworkManagementService
    @UnsupportedAppUsage
    void startTethering(in String[] dhcpRanges);

    /**
     * Start tethering services with the specified dhcp server range and
     * DNS proxy config.
     * {@code boolean} is used to control legacy DNS proxy server.
     * {@code String[]} is a set of start end pairs defining the ranges.
     */
    void startTetheringWithConfiguration(boolean usingLegacyDnsProxy, in String[] dhcpRanges);

    /**
     * Stop currently running tethering services
     */
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ java_library_static {
        "android.hardware.contexthub-V1.0-java",
        "android.hidl.manager-V1.2-java",
        "dnsresolver_aidl_interface-V2-java",
        "netd_aidl_interface-V2-java",
        "netd_aidl_interface-java",
        "netd_event_listener_interface-java",
    ],
}
+6 −2
Original line number Diff line number Diff line
@@ -1008,11 +1008,15 @@ public class NetworkManagementService extends INetworkManagementService.Stub {

    @Override
    public void startTethering(String[] dhcpRange) {
        startTetheringWithConfiguration(true, dhcpRange);
    }

    @Override
    public void startTetheringWithConfiguration(boolean usingLegacyDnsProxy, String[] dhcpRange) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        // an odd number of addrs will fail

        try {
            mNetdService.tetherStart(dhcpRange);
            mNetdService.tetherStartWithConfiguration(usingLegacyDnsProxy, dhcpRange);
        } catch (RemoteException | ServiceSpecificException e) {
            throw new IllegalStateException(e);
        }
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ java_library_static {
    static_libs: [
        "dnsresolver_aidl_interface-V2-java",
        "ipmemorystore-client",
        "netd_aidl_interface-V2-java",
        "netd_aidl_interface-java",
        "networkstack-aidl-interfaces-V3-java",
    ],
}