Skip to content
Snippets Groups Projects
Commit 890866e1 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge d4e53673 on remote branch

Change-Id: I72c142ad2a3327228ab86f49a1266f6a5ca19a93
......@@ -258,11 +258,15 @@ public class MainActivity extends Activity implements View.OnClickListener {
return COMMAND_RESULT_INVALID_ARGS;
}
String ifname = params[1];
int dbm = Integer.parseInt(params[2]);
boolean res = mUniqueInstance.setTxPower(ifname, dbm);
if (!res) {
return COMMAND_RESULT_FAILED;
try {
String ifname = params[1];
int dbm = Integer.parseInt(params[2]);
boolean res = mUniqueInstance.setTxPower(ifname, dbm);
if (!res) {
return COMMAND_RESULT_FAILED;
}
} catch (NumberFormatException e) {
return COMMAND_RESULT_INVALID_ARGS;
}
return COMMAND_RESULT_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment