Merge "Support enable/disable dns forwarding of dnsmasq when start tethering"
am: 6fecb94292
Change-Id: I8f5c67fa1e045c9fd4a5e7a753df285d1111c1d2
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user