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="start_tdls">Start TDLS</string>
|
||||||
<string name="stop_tdls">Stop 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="start_mms">Start MMS</string>
|
||||||
<string name="stop_mms">Stop MMS</string>
|
<string name="stop_mms">Stop MMS</string>
|
||||||
|
|||||||
@@ -501,14 +501,26 @@ public class Connectivity extends Activity {
|
|||||||
private void onStartTdls() {
|
private void onStartTdls() {
|
||||||
mTdlsAddr = ((EditText)findViewById(R.id.sc_ip_mac)).getText().toString();
|
mTdlsAddr = ((EditText)findViewById(R.id.sc_ip_mac)).getText().toString();
|
||||||
Log.d(TAG, "TDLS: START " + mTdlsAddr);
|
Log.d(TAG, "TDLS: START " + mTdlsAddr);
|
||||||
|
InetAddress inetAddress = null;
|
||||||
|
try {
|
||||||
|
inetAddress = InetAddress.getByName(mTdlsAddr);
|
||||||
|
mWm.enableTdls(inetAddress, true);
|
||||||
|
} catch (Exception e) {
|
||||||
mWm.enableTdlsWithMacAddress(mTdlsAddr, true);
|
mWm.enableTdlsWithMacAddress(mTdlsAddr, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onStopTdls() {
|
private void onStopTdls() {
|
||||||
if (mTdlsAddr == null) return;
|
if (mTdlsAddr == null) return;
|
||||||
Log.d(TAG, "TDLS: STOP " + mTdlsAddr);
|
Log.d(TAG, "TDLS: STOP " + mTdlsAddr);
|
||||||
|
InetAddress inetAddress = null;
|
||||||
|
try {
|
||||||
|
inetAddress = InetAddress.getByName(mTdlsAddr);
|
||||||
|
mWm.enableTdls(inetAddress, false);
|
||||||
|
} catch (Exception e) {
|
||||||
mWm.enableTdlsWithMacAddress(mTdlsAddr, false);
|
mWm.enableTdlsWithMacAddress(mTdlsAddr, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onAddDefaultRoute() {
|
private void onAddDefaultRoute() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user