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() {
|
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
Editable value = input.getText();
|
Editable value = input.getText();
|
||||||
|
try {
|
||||||
netid = Integer.parseInt(value.toString());
|
netid = Integer.parseInt(value.toString());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// Invalid netid
|
||||||
|
e.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
mWifiManager.disableNetwork(netid);
|
mWifiManager.disableNetwork(netid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user