Fix crash in WiFi Settings test code.
Bug: 23264452 Change-Id: I285512fe4c0dbc842e041b551819d650f5cf9bbe
This commit is contained in:
@@ -109,7 +109,13 @@ Preference.OnPreferenceClickListener {
|
||||
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
Editable value = input.getText();
|
||||
netid = Integer.parseInt(value.toString());
|
||||
try {
|
||||
netid = Integer.parseInt(value.toString());
|
||||
} catch (NumberFormatException e) {
|
||||
// Invalid netid
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
mWifiManager.disableNetwork(netid);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user