Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f52f40c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix force close in WiFi API test code" into main

parents fc564f2b 6bafe1b1
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -164,7 +164,13 @@ public class WifiAPITest extends SettingsPreferenceFragment implements
            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.enableNetwork(netid, false);
                    mWifiManager.enableNetwork(netid, false);
                }
                }
            });
            });