删除冗余代码

master
ThankVinci 4 years ago
parent 5ddd94cfc2
commit e123e3d48a

@ -29,17 +29,4 @@ public class NetCheck {
return "当前连接到未知网络"; return "当前连接到未知网络";
} }
} }
public static boolean isOnline(){
Runtime runtime = Runtime.getRuntime();
try {
Process ipProcess = runtime.exec("ping -c 3 cn.bing.com");
int exitValue = ipProcess.waitFor();
Log.i("Avalible", "Process:"+exitValue);
return (exitValue == 0);
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
return false;
}
} }

Loading…
Cancel
Save