mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-07 19:14:19 +08:00
Modify change net work state judgment in GithubReleaseTool
This commit is contained in:
@@ -92,7 +92,7 @@ object GithubReleaseTool {
|
|||||||
* @param callback 已连接回调
|
* @param callback 已连接回调
|
||||||
*/
|
*/
|
||||||
private fun checkingInternetConnect(context: Context, callback: () -> Unit) = runInSafe {
|
private fun checkingInternetConnect(context: Context, callback: () -> Unit) = runInSafe {
|
||||||
if (isNetWorkSuccess)
|
if (context.isNetWorkSuccess)
|
||||||
OkHttpClient().newBuilder().build().newCall(
|
OkHttpClient().newBuilder().build().newCall(
|
||||||
Request.Builder()
|
Request.Builder()
|
||||||
.url("https://www.baidu.com")
|
.url("https://www.baidu.com")
|
||||||
|
Reference in New Issue
Block a user