summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt3
-rw-r--r--core/java/android/net/ConnectivityManager.java17
-rw-r--r--core/java/android/net/IConnectivityManager.aidl2
-rw-r--r--core/res/res/values/public.xml3
-rw-r--r--services/java/com/android/server/ConnectivityService.java5
-rw-r--r--services/java/com/android/server/connectivity/Tethering.java7
-rw-r--r--tools/layoutlib/Android.mk1
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java28
8 files changed, 6 insertions, 60 deletions
diff --git a/api/current.txt b/api/current.txt
index 0a80cac3b542..a98fcfb82613 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -253,13 +253,10 @@ package android {
field public static final int actionModeCloseDrawable = 16843484; // 0x10102dc
field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
field public static final int actionModeCutDrawable = 16843537; // 0x1010311
- field public static final int actionModeFindDrawable = 16843898; // 0x101047a
field public static final int actionModePasteDrawable = 16843539; // 0x1010313
field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e
- field public static final int actionModeShareDrawable = 16843897; // 0x1010479
field public static final int actionModeSplitBackground = 16843677; // 0x101039d
field public static final int actionModeStyle = 16843668; // 0x1010394
- field public static final int actionModeWebSearchDrawable = 16843899; // 0x101047b
field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
field public static final int actionProviderClass = 16843657; // 0x1010389
field public static final int actionViewClass = 16843516; // 0x10102fc
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 2aff5f2d69a8..70c8750623fb 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -929,23 +929,6 @@ public class ConnectivityManager {
}
/**
- * Get the set of tethered dhcp ranges.
- *
- * @return an array of 0 or more Strings of tethered dhcp ranges.
- *
- * <p>This method requires the call to hold the permission
- * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
- * {@hide}
- */
- public String[] getTetheredDhcpRanges() {
- try {
- return mService.getTetheredDhcpRanges();
- } catch (RemoteException e) {
- return new String[0];
- }
- }
-
- /**
* Get the set of tethered interfaces.
*
* @return an array of 0 or more String of currently tethered interface names.
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 3bfd88ec6c06..4bca7fefbc44 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -91,8 +91,6 @@ interface IConnectivityManager
String[] getTetherableIfaces();
- String[] getTetheredDhcpRanges();
-
String[] getTetheredIfaces();
String[] getTetheringErroredIfaces();
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 34f6afbfb6e3..81879392c222 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -568,9 +568,6 @@
<public type="attr" name="listChoiceIndicatorMultiple" id="0x0101021a" />
<public type="attr" name="versionCode" id="0x0101021b" />
<public type="attr" name="versionName" id="0x0101021c" />
- <public type="attr" name="actionModeShareDrawable" id="0x01010479" />
- <public type="attr" name="actionModeFindDrawable" id="0x0101047a" />
- <public type="attr" name="actionModeWebSearchDrawable" id="0x0101047b" />
<public type="id" name="background" id="0x01020000" />
<public type="id" name="checkbox" id="0x01020001" />
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 2d1921e79479..b7a1a55e14fc 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3297,11 +3297,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return mTethering.getTetherableIfaces();
}
- public String[] getTetheredDhcpRanges() {
- enforceConnectivityInternalPermission();
- return mTethering.getTetheredDhcpRanges();
- }
-
public String[] getTetheredIfaces() {
enforceTetherAccessPermission();
return mTethering.getTetheredIfaces();
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 91b9b072de30..adf1dfc10ef5 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -109,7 +109,6 @@ public class Tethering extends BaseNetworkObserver {
// USB is 192.168.42.1 and 255.255.255.0
// Wifi is 192.168.43.1 and 255.255.255.0
- // P2P is 192.168.49.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
@@ -118,7 +117,7 @@ public class Tethering extends BaseNetworkObserver {
"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.49.2", "192.168.49.254",
+ "192.168.48.2", "192.168.48.254",
};
private String[] mDefaultDnsServers;
@@ -700,10 +699,6 @@ public class Tethering extends BaseNetworkObserver {
return retVal;
}
- public String[] getTetheredDhcpRanges() {
- return mDhcpRange;
- }
-
public String[] getErroredIfaces() {
ArrayList<String> list = new ArrayList<String>();
synchronized (mPublicSync) {
diff --git a/tools/layoutlib/Android.mk b/tools/layoutlib/Android.mk
index 258d9b3857be..5d03842e7f7f 100644
--- a/tools/layoutlib/Android.mk
+++ b/tools/layoutlib/Android.mk
@@ -53,7 +53,6 @@ include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): $(built_core_dep) \
$(built_framework_dep) \
$(built_ext_dep) \
- $(built_ext_data) \
$(built_layoutlib_create_jar)
$(hide) echo "host layoutlib_create: $@"
$(hide) mkdir -p $(dir $@)
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index a38f23413130..8b072089255d 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -109,7 +109,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
INetworkManagementService mNwService;
private DhcpStateMachine mDhcpStateMachine;
- private ConnectivityManager mCm;
private P2pStateMachine mP2pStateMachine;
private AsyncChannel mReplyChannel = new AsyncChannel();
@@ -227,6 +226,9 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
/* clients(application) information list. */
private HashMap<Messenger, ClientInfo> mClientInfoList = new HashMap<Messenger, ClientInfo>();
+ /* Is chosen as a unique range to avoid conflict with
+ the range defined in Tethering.java */
+ private static final String[] DHCP_RANGE = {"192.168.49.2", "192.168.49.254"};
private static final String SERVER_ADDRESS = "192.168.49.1";
/**
@@ -2056,15 +2058,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
- private void checkAndSetConnectivityInstance() {
- if (mCm == null) {
- mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
- }
- }
-
private void startDhcpServer(String intf) {
InterfaceConfiguration ifcg = null;
- checkAndSetConnectivityInstance();
try {
ifcg = mNwService.getInterfaceConfig(intf);
ifcg.setLinkAddress(new LinkAddress(NetworkUtils.numericToInetAddress(
@@ -2072,30 +2067,17 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
ifcg.setInterfaceUp();
mNwService.setInterfaceConfig(intf, ifcg);
/* This starts the dnsmasq server */
- String[] tetheringDhcpRanges = mCm.getTetheredDhcpRanges();
- if (mNwService.isTetheringStarted()) {
- if (DBG) logd("Stop exist tethering and will restart it");
- mNwService.stopTethering();
- mNwService.tetherInterface(intf);
- }
- mNwService.startTethering(tetheringDhcpRanges);
+ mNwService.startTethering(DHCP_RANGE);
} catch (Exception e) {
loge("Error configuring interface " + intf + ", :" + e);
return;
}
+
logd("Started Dhcp server on " + intf);
}
private void stopDhcpServer(String intf) {
try {
- for (String temp : mNwService.listTetheredInterfaces()) {
- logd("List all interfaces " + temp);
- if (temp.compareTo(intf) != 0 ) {
- logd("Found other tethering interface so keep tethering alive");
- mNwService.untetherInterface(intf);
- return;
- }
- }
mNwService.stopTethering();
} catch (Exception e) {
loge("Error stopping Dhcp server" + e);