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
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index fb4912f..fcaf03f 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -1462,6 +1462,20 @@
     }
 
     /**
+     * Get the set of tethered dhcp ranges.
+     *
+     * @return an array of 0 or more {@code String} of tethered dhcp ranges.
+     * {@hide}
+     */
+    public String[] getTetheredDhcpRanges() {
+        try {
+            return mService.getTetheredDhcpRanges();
+        } catch (RemoteException e) {
+            return new String[0];
+        }
+    }
+
+    /**
      * Attempt to tether the named interface.  This will setup a dhcp server
      * on the interface, forward and NAT IP packets and forward DNS requests
      * to the best active upstream network interface.  Note that if no upstream