Adding database information insertion features in the phone app
[iot2.git] / others / lede-gui / src / main / java / com / example / lede2 / EnrollDeviceActivity.java
index 926870a5e4e20ae7d085a7650fc74d5b1e0d55fe..be1d04acca7ee4b9dab2d5628d8c28634a71bfff 100644 (file)
@@ -100,19 +100,23 @@ public class EnrollDeviceActivity extends AppCompatActivity implements View.OnCl
                     ssh = new SSH();\r
 \r
                     // execute shell script  (script's function -> Save contents(Mac,Ip,Key,Name) on hostapd-psk)\r
-                    ssh.execute("-co " + networkPass + " " + deviceName +" "+ ConfigActivity.RPWD);//review!!!!!!\r
+                    ssh.execute("-co " + networkPass + " " + deviceName + " " + ConfigActivity.RPWD);//review!!!!!!\r
                     try {//To execute asyntask in ssh object, we have to sleep main thread\r
                         Thread.sleep(1000);\r
                     } catch (Exception e) {\r
                         Log.d("SLEEP EXCEPTION", "SLEEP EXCEPTION occurs in onClick method of EnrollDeviceActivity");\r
                     }\r
                     finish();//Go back to the Main Activity\r
-                } else { //if name of wifi is not LEDE2 -> go to wifi configuration screen to change wifi type\r
+                } else { //if name of wifi is not LEDE -> go to wifi configuration screen to change wifi type\r
                     Toast t = Toast.makeText(this, R.string.try_again, Toast.LENGTH_SHORT);\r
                     t.show();\r
                     startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));\r
                 }\r
             }\r
+            // Call activity that adds device - not doing this flow because we haven't found\r
+            // a way to change password without restarting WiFi\r
+            //startActivity(new Intent(this, AddDeviceActivity.class));\r
+            //finish();\r
         } else if (v == wifi) {\r
             startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));\r
         }\r