summaryrefslogtreecommitdiffstats
path: root/apps/Development/src/com/android
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-07-19 15:48:50 -0700
committerDmitry Shmidt <dimitrysh@google.com>2013-07-19 15:55:35 -0700
commit81253bc3765faff218f37619fef7f5bfc9ba0a97 (patch)
tree165dd0f79402ccd9f53f197da48317059c5ae0fe /apps/Development/src/com/android
parent47a5a18431a9fd7256f4a53a9d845fd2ab5bba3a (diff)
downloadandroid_development-81253bc3765faff218f37619fef7f5bfc9ba0a97.tar.gz
android_development-81253bc3765faff218f37619fef7f5bfc9ba0a97.tar.bz2
android_development-81253bc3765faff218f37619fef7f5bfc9ba0a97.zip
Connectivity: Add IP config to TDLS test
Change-Id: I70096a042faaacdaeed7d6aae16a95704202ef1d Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'apps/Development/src/com/android')
-rw-r--r--apps/Development/src/com/android/development/Connectivity.java16
1 files changed, 14 insertions, 2 deletions
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() {