Skip to content

Commit 24e4671

Browse files
author
ctj
committed
修改配置文件
1 parent 03d5c6b commit 24e4671

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ allprojects {
2525
```groovy
2626
dependencies {
2727
//多个物联网相关基础工具类
28-
implementation 'com.github.wave-chtj:BaseIotUtils:1.3.8'
28+
implementation 'com.github.wave-chtj:BaseIotUtils:1.4.6'
2929
}
3030
```
3131

base_iotutils/src/main/java/com/face_chtj/base_iotutils/network/NetChangeMonitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void onReceive(Context context, Intent intent) {
7171
for (int i = 0; i < randomPosition.length; i++) {
7272
dns[i] = NetUtils.DNS_LIST[randomPosition[i]];
7373
}
74-
boolean isPing=NetUtils.checkNetWork(dns,2, 3);
74+
boolean isPing=NetUtils.checkNetWork(dns,1, 1);
7575
//KLog.d("onReceive() isPing >> "+isPing+",dnsList >> "+ Arrays.toString(dns));
7676
mINetChangeCallback.changed(type, isPing);
7777
}

base_iotutils/src/main/java/com/face_chtj/base_iotutils/network/NetUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ public static boolean isConnected() {
268268
* 根据输入的dns列表循环判断网络是否异常
269269
* dns中只要有一个通过 那么证明网络正常
270270
*/
271-
public static boolean checkNetWork(String[] dnsList, int count, int deadline) {
271+
public static boolean checkNetWork(String[] dnsList, int count, int w) {
272272
for (String pingAddr : dnsList) {
273-
boolean isPing=NetUtils.ping(pingAddr, count, deadline);
273+
boolean isPing=NetUtils.ping(pingAddr, count, w);
274274
//KLog.d("checkNetWork() isPing >> "+isPing);
275275
if (isPing) {
276276
//If it is abnormal when entering the program network at the beginning, then only prompt once

config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ext {
6464
"gson" : "com.google.code.gson:gson:2.8.6",
6565
//物联网开发基础工具类
6666
"base_keepalive" : "com.github.wave-chtj:BaseKeepAlive:1.0.1",
67-
"base_iotutils" : "com.github.wave-chtj:BaseIotUtils:1.3.4",
67+
"base_iotutils" : "com.github.wave-chtj:BaseIotUtils:1.4.6",
6868
"base_framework" : "com.github.wave-chtj:BaseFramework:1.0.6",
6969
"base_socket" : "com.github.wave-chtj:BaseSocket:1.0.1",
7070
//权限管理

0 commit comments

Comments
 (0)