Merge "Connectivity: Add IP config to TDLS test"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e948041d54
@@ -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>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user