Merge "Support enable/disable dns forwarding of dnsmasq when start tethering" am: 6fecb94292
am: a3ddee80fd
Change-Id: If5a280508dcc95df911d1d72671857a8c58bbbd4
This commit is contained in:
@@ -149,6 +149,14 @@ interface INetworkManagementService
|
|||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
void startTethering(in String[] dhcpRanges);
|
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
|
* Stop currently running tethering services
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ java_library_static {
|
|||||||
"android.hardware.contexthub-V1.0-java",
|
"android.hardware.contexthub-V1.0-java",
|
||||||
"android.hidl.manager-V1.2-java",
|
"android.hidl.manager-V1.2-java",
|
||||||
"dnsresolver_aidl_interface-V2-java",
|
"dnsresolver_aidl_interface-V2-java",
|
||||||
"netd_aidl_interface-V2-java",
|
"netd_aidl_interface-java",
|
||||||
"netd_event_listener_interface-java",
|
"netd_event_listener_interface-java",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1008,11 +1008,15 @@ public class NetworkManagementService extends INetworkManagementService.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startTethering(String[] dhcpRange) {
|
public void startTethering(String[] dhcpRange) {
|
||||||
|
startTetheringWithConfiguration(true, dhcpRange);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startTetheringWithConfiguration(boolean usingLegacyDnsProxy, String[] dhcpRange) {
|
||||||
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
||||||
// an odd number of addrs will fail
|
// an odd number of addrs will fail
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mNetdService.tetherStart(dhcpRange);
|
mNetdService.tetherStartWithConfiguration(usingLegacyDnsProxy, dhcpRange);
|
||||||
} catch (RemoteException | ServiceSpecificException e) {
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ java_library_static {
|
|||||||
static_libs: [
|
static_libs: [
|
||||||
"dnsresolver_aidl_interface-V2-java",
|
"dnsresolver_aidl_interface-V2-java",
|
||||||
"ipmemorystore-client",
|
"ipmemorystore-client",
|
||||||
"netd_aidl_interface-V2-java",
|
"netd_aidl_interface-java",
|
||||||
"networkstack-aidl-interfaces-V3-java",
|
"networkstack-aidl-interfaces-V3-java",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user