summaryrefslogtreecommitdiffstats
path: root/apps/Development
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Development')
-rw-r--r--apps/Development/res/values/strings.xml2
-rw-r--r--apps/Development/src/com/android/development/Connectivity.java16
2 files changed, 15 insertions, 3 deletions
diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml
index dc36859aa..ced7b727d 100644
--- a/apps/Development/res/values/strings.xml
+++ b/apps/Development/res/values/strings.xml
@@ -36,7 +36,7 @@
<string name="start_tdls">Start TDLS</string>
<string name="stop_tdls">Stop TDLS</string>
- <string name="mac_tdls"> MAC: </string>
+ <string name="mac_tdls"> IP/MAC: </string>
<string name="start_mms">Start MMS</string>
<string name="stop_mms">Stop MMS</string>
diff --git a/apps/Development/src/com/android/development/Connectivity.java b/apps/Development/src/com/android/development/Connectivity.java
index 12fa24a8e..0da1410f0 100644
--- a/apps/Development/src/com/android/development/Connectivity.java
+++ b/apps/Development/src/com/android/development/Connectivity.java
@@ -501,13 +501,25 @@ public class Connectivity extends Activity {
private void onStartTdls() {
mTdlsAddr = ((EditText)findViewById(R.id.sc_ip_mac)).getText().toString();
Log.d(TAG, "TDLS: START " + mTdlsAddr);
- mWm.enableTdlsWithMacAddress(mTdlsAddr, true);
+ InetAddress inetAddress = null;
+ try {
+ inetAddress = InetAddress.getByName(mTdlsAddr);
+ mWm.enableTdls(inetAddress, true);
+ } catch (Exception e) {
+ mWm.enableTdlsWithMacAddress(mTdlsAddr, true);
+ }
}
private void onStopTdls() {
if (mTdlsAddr == null) return;
Log.d(TAG, "TDLS: STOP " + mTdlsAddr);
- mWm.enableTdlsWithMacAddress(mTdlsAddr, false);
+ InetAddress inetAddress = null;
+ try {
+ inetAddress = InetAddress.getByName(mTdlsAddr);
+ mWm.enableTdls(inetAddress, false);
+ } catch (Exception e) {
+ mWm.enableTdlsWithMacAddress(mTdlsAddr, false);
+ }
}
private void onAddDefaultRoute() {