Commit d05cc689 by pye52

Merge branch 'master' into rel-1.3.6

parents b6384fef 4383580a
...@@ -14,7 +14,6 @@ import static com.bgycc.smartcanteen.utils.SmartCanteenUtils.TAG; ...@@ -14,7 +14,6 @@ import static com.bgycc.smartcanteen.utils.SmartCanteenUtils.TAG;
public class WifiConfigCommandWorker extends CommandWorker { public class WifiConfigCommandWorker extends CommandWorker {
private static final long DEFAULT_DELAY = 3000; private static final long DEFAULT_DELAY = 3000;
private static final long POLLING_DELAY = 200;
private CommandWifiConfig wifiConfig; private CommandWifiConfig wifiConfig;
public WifiConfigCommandWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) { public WifiConfigCommandWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
...@@ -61,8 +60,7 @@ public class WifiConfigCommandWorker extends CommandWorker { ...@@ -61,8 +60,7 @@ public class WifiConfigCommandWorker extends CommandWorker {
try { try {
NetworkUtils.connect(ssid, identity, pwd, type); NetworkUtils.connect(ssid, identity, pwd, type);
// 轮询检查wifi是否链接成功 // 轮询检查wifi是否链接成功
for (int i = 0; i < 50; i++) { for (int i = 0; i < 20; i++) {
Thread.sleep(POLLING_DELAY);
WifiInfo info = NetworkUtils.getWifiInfo(); WifiInfo info = NetworkUtils.getWifiInfo();
if (info == null || info.getIpAddress() == 0) { if (info == null || info.getIpAddress() == 0) {
continue; continue;
......
...@@ -176,7 +176,7 @@ public class PayOfflineViewModel extends ViewModel { ...@@ -176,7 +176,7 @@ public class PayOfflineViewModel extends ViewModel {
private class RequestRunnable implements Runnable { private class RequestRunnable implements Runnable {
// 离线支付每一次上传的订单量(若上传数据量过大服务器会拒绝) // 离线支付每一次上传的订单量(若上传数据量过大服务器会拒绝)
private static final int PAY_OFFLINE_PER_LIMIT = 10; private static final int PAY_OFFLINE_PER_LIMIT = 20;
@Override @Override
public void run() { public void run() {
long currentTime = System.currentTimeMillis(); long currentTime = System.currentTimeMillis();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment