Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Remove unused resources and code
Browse files Browse the repository at this point in the history
  • Loading branch information
matsujirushi committed Mar 22, 2021
1 parent d8fabba commit af31aeb
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 744 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,117 +264,6 @@ public void wifiConnect(final String SSID) {
mWaitDialog.setMessage("Connecting to " + SSID + "...");
mWaitDialog.setCanceledOnTouchOutside(false);
mWaitDialog.show();
// startTime = System.currentTimeMillis();
//
// final Timer timer = new Timer();
// timer.scheduleAtFixedRate(new TimerTask() {
// public void run() {
// flag++;
// if (flag >= TimeOutCount) {
// // TimeOutCount = App.getSp().getInt(Constant.SP_Connect_Wifi_TimeOut_Count, 30);
// if (TimeOutCount <= 60) {
// TimeOutCount += 15;
// }
// App.getSp().edit().putInt(Constant.SP_Connect_Wifi_TimeOut_Count, TimeOutCount).commit();
// timer.cancel();
// MLog.e(this, "超时");
// runOnUiThread(new Runnable() {
// @Override
// public void run() {
// /* DialogUtils.showErrorDialog(Step03WifiWioListActivity.this, "Fail connect to Wio Wifi:1031", getString(R.string.dialog_btn_tryAgain),
// getString(R.string.dialog_btn_Cancel), getString(R.string.cont_connection_wio_wifi), new DialogUtils.OnErrorButtonClickListenter() {
// @Override
// public void okClick() {
// wifiConnect(SSID);
// timer.cancel();
// }
//
// @Override
// public void cancelClick() {
// timer.cancel();
// }
// });*/
// AlertDialog dialog = new AlertDialog.Builder(Step03WifiWioListActivity.this)
// .setTitle("Fail connect to Wio Wi-Fi")
// .setMessage(getString(R.string.cont_connection_wio_wifi))
// .setPositiveButton("Try again", new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// TimeOutCount = App.getSp().getInt(Constant.SP_Connect_Wifi_TimeOut_Count, 30);
// wifiConnect(SSID);
// timer.cancel();
// ConnectCount++;
// }
// })
// .setNeutralButton("Setting", new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// timer.cancel();
// Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
// startActivityForResult(intent, SETTING_REQ_CODE);
// }
// })
// .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
// @Override
//
// public void onClick(DialogInterface dialog, int which) {
// timer.cancel();
// }
// }).create();
// // dialog.setCancelable(true);
// dialog.setCanceledOnTouchOutside(true);
// dialog.show();
//
// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.VISIBLE);
// /* if (ConnectCount > 2) {
// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.VISIBLE);
// } else {
// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.GONE);
// }*/
// }
// });
//
// if (mWaitDialog != null) {
// mWaitDialog.dismiss();
// }
// } else {
// /* runOnUiThread(new Runnable() {
// @Override
// public void run() {
// if (!checkWifiIsExist(SSID)) {
// timer.cancel();
// if (mWaitDialog != null) {
// mWaitDialog.dismiss();
// }
// DialogUtils.showErrorDialog(Step03WifiWioListActivity.this, "WiFi not exist:1034", getString(R.string.dialog_btn_OK),
// null, "Equipment Wi-Fi hotspot does not exist", null);
// }
// }
// });*/
// }
// if (WifiUtils.isWifiConnected(Step03WifiWioListActivity.thi s) && getCurrentSsid().equals("\"" + SSID + "\"")) {
// timer.cancel();
// MLog.e(this, "连接成功");
// if (mWaitDialog != null) {
// mWaitDialog.dismiss();
// }
// Log.e(TAG, "###### connect success");
// goStep04();
// return;
// } else {
// // MLog.e(this, "连接失败");
// }
// runOnUiThread(new Runnable() {
// @Override
// public void run() {
// mWaitDialog.setMessage("Connecting to " + SSID + " Wi-Fi (" + (TimeOutCount - flag) + ")");
// }
// });
//
// }
// }

// , 1500, 1000);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ public void cancelClick() {
return;
}
OtherPlatformUtils.getFacebookInfo(this, callbackManager, OtherPlatformUtils.LoginWithFacebook);
// dialog = DialogUtils.showProgressDialog(LoginAndRegistActivity.this, getString(R.string.loading_login));
break;
case R.id.mRlSelectServer:
startActivity(new Intent(LoginAndRegistActivity.this, SelectServerActivity.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,6 @@ public void onClick(DialogInterface dialog, int which) {
return true;
}
Intent intent = new Intent(this, SetupDeviceActivity.class);
/* if (node.board.equals(Constant.WIO_LINK_V1_0)) {
intent.setClass(this, SetupIotLinkActivity.class);
} else if (node.board.equals(Constant.WIO_NODE_V1_0)) {
intent.setClass(this, SetupIotNodeActivity.class);
}*/
intent.putExtra("node_sn", node.node_sn);
startActivity(intent);
return true;
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/cc/seeed/iot/util/DialogUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ public void onClick(View v) {
if (mRbCustomServer.isChecked()) {
String url = mEtCustomServer.getText().toString().trim();
if (!RegularUtils.isWebsite(url)) {
// App.showToastShrot(context.getString(R.string.website_format_error));
mEtCustomServer.setError(context.getResources().getString(R.string.website_format_hint), context.getDrawable(R.mipmap.edit_help));
return;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/ap_connect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/mIvLoading"
android:layout_marginTop="50dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:gravity="center_horizontal"
android:text="We are almost there!\r\nThis process will take about a minute."
android:text="We are almost there!\nThis process will take about a minute."
android:textColor="#A6000000"
android:textSize="14sp"
app:cusTextFont="@string/Proxima_Nova_Regular" />
Expand Down
38 changes: 0 additions & 38 deletions app/src/main/res/layout/dialog_name_input.xml

This file was deleted.

117 changes: 0 additions & 117 deletions app/src/main/res/layout/smartconfig_connect.xml

This file was deleted.

Loading

0 comments on commit af31aeb

Please sign in to comment.