diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-06-23 14:53:42 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2014-07-10 18:56:12 +0000 |
commit | 9c7e2c2cb491268db0322ad78856faf0582e61d1 (patch) | |
tree | 407f376598a830fa7e7b573422744d196dc84281 /services/core/java/com/android/server/connectivity/Tethering.java | |
parent | 35d552f7adf0ccffbd78c4220862188a198dda7d (diff) | |
download | frameworks_base-9c7e2c2cb491268db0322ad78856faf0582e61d1.zip frameworks_base-9c7e2c2cb491268db0322ad78856faf0582e61d1.tar.gz frameworks_base-9c7e2c2cb491268db0322ad78856faf0582e61d1.tar.bz2 |
Refactor wifi p2p's startDhcpServer function
Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering to update dhcp ranges. This will allow
p2p apps to run well concurently with other tethering apps.
Manual import of AOSP change 81546 by jianzheng.zhou@freescale.com
Change-Id: Iebc62f95bdcedde80e2c1d3e9580d3f625c3b50b
Diffstat (limited to 'services/core/java/com/android/server/connectivity/Tethering.java')
-rw-r--r-- | services/core/java/com/android/server/connectivity/Tethering.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java index ec3389b..01a2fc2 100644 --- a/services/core/java/com/android/server/connectivity/Tethering.java +++ b/services/core/java/com/android/server/connectivity/Tethering.java @@ -109,13 +109,14 @@ public class Tethering extends BaseNetworkObserver { // Wifi is 192.168.43.1 and 255.255.255.0 // BT is limited to max default of 5 connections. 192.168.44.1 to 192.168.48.1 // with 255.255.255.0 + // P2P is 192.168.49.1 and 255.255.255.0 private String[] mDhcpRange; private static final String[] DHCP_DEFAULT_RANGE = { "192.168.42.2", "192.168.42.254", "192.168.43.2", "192.168.43.254", "192.168.44.2", "192.168.44.254", "192.168.45.2", "192.168.45.254", "192.168.46.2", "192.168.46.254", "192.168.47.2", "192.168.47.254", - "192.168.48.2", "192.168.48.254", + "192.168.48.2", "192.168.48.254", "192.168.49.2", "192.168.49.254", }; private String[] mDefaultDnsServers; @@ -701,6 +702,10 @@ public class Tethering extends BaseNetworkObserver { return retVal; } + public String[] getTetheredDhcpRanges() { + return mDhcpRange; + } + public String[] getErroredIfaces() { ArrayList<String> list = new ArrayList<String>(); synchronized (mPublicSync) { |