Merge branch 'master' of 10.10.25.26:/usr/local/git/v_clash_android
This commit is contained in:
commit
dd4069538c
|
|
@ -65,3 +65,4 @@ google-services.json
|
|||
|
||||
# MacOS
|
||||
.DS_Store
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
|
|
@ -2,7 +2,7 @@ package com.yingmao.clash.act
|
|||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.graphics.Bitmap
|
||||
|
|
@ -11,10 +11,7 @@ import android.net.Uri
|
|||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.text.SpannableString
|
||||
import android.text.TextPaint
|
||||
import android.text.TextUtils
|
||||
import android.text.style.ClickableSpan
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
|
|
@ -71,9 +68,7 @@ import com.yingmao.clash.view.dialog.DialogAppVersion
|
|||
import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
||||
import com.yingmao.clash.view.dialog.RxDialogSureCancel
|
||||
import com.yingmao.clash.vm.SplashAtyVM
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.delay
|
||||
|
|
@ -983,54 +978,54 @@ class SplashActivity : BaseActivity() {
|
|||
com.cncat.vpn.common.log.Log.d("httpFailure HttpReqType.CHECK_LOGIN")
|
||||
try {
|
||||
RxToast.error("检测到网络异常,请尝试切换其他地址.")
|
||||
SplashHelper(splashAtyVM).getHostWithFallback { success ->
|
||||
MainScope().launch {
|
||||
if (success) {
|
||||
if (dialogDoMainChoose == null) {
|
||||
dialogDoMainChoose = DialogDoMainChoose(this@SplashActivity)
|
||||
}
|
||||
if (dialogDoMainChoose?.isShowing == false) {
|
||||
dialogDoMainChoose?.setOnTryButtonListener(object :
|
||||
DialogDoMainChoose.OnTryButtonListener {
|
||||
override fun tryButton() {
|
||||
var currentHost = MMKV.defaultMMKV()
|
||||
.decodeString(
|
||||
BZYConstants.MMKV_KEY_CURRENT_HOST,
|
||||
""
|
||||
)
|
||||
// com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN currentHost==>${currentHost}")
|
||||
splashAtyVM.checkLogin()
|
||||
}
|
||||
|
||||
override fun cancel() {
|
||||
com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN cancel")
|
||||
dialogDoMainChoose?.dismiss()
|
||||
}
|
||||
})
|
||||
dialogDoMainChoose?.setOnListItemListener(object :
|
||||
DialogDoMainChoose.OnListItemListener {
|
||||
override fun listItemClick() {
|
||||
splashAtyVM.checkLogin()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
dialogDoMainChoose?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// SplashHelper(splashAtyVM).getHostWithFallback { success ->
|
||||
// MainScope().launch {
|
||||
// if (success) {
|
||||
// if (dialogDoMainChoose == null) {
|
||||
// dialogDoMainChoose = DialogDoMainChoose(this@SplashActivity)
|
||||
// }
|
||||
// if (dialogDoMainChoose?.isShowing == false) {
|
||||
// dialogDoMainChoose?.setOnTryButtonListener(object :
|
||||
// DialogDoMainChoose.OnTryButtonListener {
|
||||
// override fun tryButton() {
|
||||
// var currentHost = MMKV.defaultMMKV()
|
||||
// .decodeString(
|
||||
// BZYConstants.MMKV_KEY_CURRENT_HOST,
|
||||
// ""
|
||||
// )
|
||||
//// com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN currentHost==>${currentHost}")
|
||||
// splashAtyVM.checkLogin()
|
||||
// }
|
||||
//
|
||||
// override fun cancel() {
|
||||
// com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN cancel")
|
||||
// dialogDoMainChoose?.dismiss()
|
||||
// }
|
||||
// })
|
||||
// dialogDoMainChoose?.setOnListItemListener(object :
|
||||
// DialogDoMainChoose.OnListItemListener {
|
||||
// override fun listItemClick() {
|
||||
// splashAtyVM.checkLogin()
|
||||
//
|
||||
// }
|
||||
//
|
||||
// })
|
||||
// dialogDoMainChoose?.show()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
toLoginPage()
|
||||
}
|
||||
|
||||
// if (super.switchServer()) {
|
||||
// splashAtyVM.checkLogin()
|
||||
// } else {
|
||||
// toLoginPage()
|
||||
// }
|
||||
if (super.switchServer2()) {
|
||||
splashAtyVM.checkLogin()
|
||||
} else {
|
||||
toLoginPage()
|
||||
}
|
||||
}
|
||||
|
||||
else -> {}
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#Tue Jun 04 19:03:37 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=bed1da33cca0f557ab13691c77f38bb67388119e4794d113e051039b80af9bb1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
Loading…
Reference in New Issue