fix 图形认证码,云梯产品
This commit is contained in:
parent
0b6a9433c7
commit
7e386d02a6
|
|
@ -198,7 +198,11 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
var currentHost = MMKV.defaultMMKV()
|
var currentHost = MMKV.defaultMMKV()
|
||||||
.decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, "")
|
.decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, "")
|
||||||
// com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN currentHost==>${currentHost}")
|
// com.cncat.vpn.common.log.Log.d("tryButton CHECK_LOGIN currentHost==>${currentHost}")
|
||||||
loginViewMode.login(username_encrypt, password_encrypt,user_oaid)
|
loginViewMode.login(
|
||||||
|
username_encrypt,
|
||||||
|
password_encrypt,
|
||||||
|
user_oaid
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun cancel() {
|
override fun cancel() {
|
||||||
|
|
@ -209,7 +213,11 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
dialogDoMainChoose?.setOnListItemListener(object :
|
dialogDoMainChoose?.setOnListItemListener(object :
|
||||||
DialogDoMainChoose.OnListItemListener {
|
DialogDoMainChoose.OnListItemListener {
|
||||||
override fun listItemClick() {
|
override fun listItemClick() {
|
||||||
loginViewMode.login(username_encrypt, password_encrypt,user_oaid)
|
loginViewMode.login(
|
||||||
|
username_encrypt,
|
||||||
|
password_encrypt,
|
||||||
|
user_oaid
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -494,33 +502,49 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.tv_register -> {
|
R.id.tv_register -> {
|
||||||
// val intent = Intent(applicationContext, RegisterActivity::class.java)
|
val intent = Intent(applicationContext, SplashActivity::class.java)
|
||||||
// startActivityForResult(intent, LOGIN_TO_REGISTER_REQUEST_CODE)
|
startActivity(intent)
|
||||||
if (TextUtils.isEmpty(registerHost)) {
|
// if (TextUtils.isEmpty(registerHost)) {
|
||||||
if (BuildConfig.is_tz) {
|
// when {
|
||||||
getTzRegister()
|
// BuildConfig.is_ym -> {
|
||||||
} else {
|
// getYmRegister()
|
||||||
if (BuildConfig.is_ym) {
|
// }
|
||||||
getYmRegister()
|
//
|
||||||
} else {
|
// BuildConfig.is_tz -> {
|
||||||
getBzyRegister()
|
// getTzRegister()
|
||||||
}
|
// }
|
||||||
}
|
//
|
||||||
} else {
|
// BuildConfig.is_yunti -> {
|
||||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
// getYunTiRegister()
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
// else -> {
|
||||||
|
// getBzyRegister()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.tv_kefu -> {
|
R.id.tv_kefu -> {
|
||||||
var mmkvHost = MMKV.defaultMMKV()
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
.decodeString(BZYConstants.MMKV_KEY_KEFU_HOST, "")
|
.decodeString(BZYConstants.MMKV_KEY_KEFU_HOST, "")
|
||||||
if (TextUtils.isEmpty(kefuHost)) {
|
if (TextUtils.isEmpty(kefuHost)) {
|
||||||
if (BuildConfig.is_tz) {
|
when {
|
||||||
getTzKefu(mmkvHost)
|
BuildConfig.is_ym -> {
|
||||||
} else {
|
|
||||||
if (BuildConfig.is_ym) {
|
|
||||||
getYmKefu(mmkvHost)
|
getYmKefu(mmkvHost)
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_tz -> {
|
||||||
|
getTzKefu(mmkvHost)
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
getYunTiKefu(mmkvHost)
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
getBzyKefu(mmkvHost)
|
getBzyKefu(mmkvHost)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -631,6 +655,37 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getYunTiRegister() {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
loginViewMode.getYunTiRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
// mmkvHost = str
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun getYmKefu(mmkvHost: String?) {
|
private fun getYmKefu(mmkvHost: String?) {
|
||||||
loginViewMode.getYmKefuHost(object : AsyncBodyCallback {
|
loginViewMode.getYmKefuHost(object : AsyncBodyCallback {
|
||||||
|
|
@ -656,6 +711,30 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getYunTiKefu(mmkvHost: String?) {
|
||||||
|
loginViewMode.getYunTiKefuHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_KEFU_HOST, str)
|
||||||
|
}
|
||||||
|
kefuHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
private fun getBzyKefu(mmkvHost: String?) {
|
private fun getBzyKefu(mmkvHost: String?) {
|
||||||
loginViewMode.getBzyKefuHost(object : AsyncBodyCallback {
|
loginViewMode.getBzyKefuHost(object : AsyncBodyCallback {
|
||||||
override suspend fun suc(str: String) {
|
override suspend fun suc(str: String) {
|
||||||
|
|
@ -729,6 +808,7 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
passwordEt.transformationMethod = PasswordTransformationMethodBigDot()
|
passwordEt.transformationMethod = PasswordTransformationMethodBigDot()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showUpdateDialog(url: String, illustrate: String, isForce: Boolean) {
|
private fun showUpdateDialog(url: String, illustrate: String, isForce: Boolean) {
|
||||||
if (TextUtils.isEmpty(url)) {
|
if (TextUtils.isEmpty(url)) {
|
||||||
RxToast.error(resources.getString(R.string.downloadEmpty))
|
RxToast.error(resources.getString(R.string.downloadEmpty))
|
||||||
|
|
@ -785,6 +865,7 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
})
|
})
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun installApk(filePath: String) {
|
fun installApk(filePath: String) {
|
||||||
val file = File(filePath)
|
val file = File(filePath)
|
||||||
val uri: Uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
val uri: Uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ public abstract class MyClickableSpan extends ClickableSpan {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateDrawState(@NonNull TextPaint ds) {
|
public void updateDrawState(@NonNull TextPaint ds) {
|
||||||
ds.setColor(Color.parseColor("#B0BFFA"));
|
ds.setColor(Color.parseColor("#f11f04"));
|
||||||
ds.setUnderlineText(false);
|
ds.setUnderlineText(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -786,26 +786,39 @@ class NewMainActivity : BaseActivity() {
|
||||||
drawer.close()
|
drawer.close()
|
||||||
}
|
}
|
||||||
val telegramBtn = findViewById<TextView>(R.id.tv_dianbao)
|
val telegramBtn = findViewById<TextView>(R.id.tv_dianbao)
|
||||||
|
|
||||||
telegramBtn.setOnClickListener {//电报
|
telegramBtn.setOnClickListener {//电报
|
||||||
var uri = Uri.parse(BZYConstants.DefTGUrl)
|
var uri = Uri.parse(BZYConstants.DefTGUrl)
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
if (BuildConfig.is_tz) {
|
when {
|
||||||
uri = Uri.parse(BZYConstants.TZTGUrl)
|
BuildConfig.is_ym -> {
|
||||||
} else {
|
|
||||||
if (BuildConfig.is_ym) {
|
|
||||||
uri = Uri.parse(BZYConstants.YMTGUrl)
|
uri = Uri.parse(BZYConstants.YMTGUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_tz -> {
|
||||||
|
uri = Uri.parse(BZYConstants.TZTGUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
uri = Uri.parse(BZYConstants.YunTiTGUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
uri = Uri.parse(BZYConstants.DefTGUrl)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
intent.setData(uri)
|
intent.setData(uri)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
drawer.close()
|
drawer.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
findViewById<TextView>(R.id.tv_kefu).setOnClickListener {//客服
|
findViewById<TextView>(R.id.tv_kefu).setOnClickListener {//客服
|
||||||
startActivity(Intent(this, BZYWebViewKeFu::class.java))
|
startActivity(Intent(this, BZYWebViewKeFu::class.java))
|
||||||
|
|
||||||
drawer.close()
|
drawer.close()
|
||||||
}
|
}
|
||||||
findViewById<TextView>(R.id.tv_fds).setOnClickListener {//防丢失
|
var fds_view = findViewById<TextView>(R.id.tv_fds);
|
||||||
|
fds_view.setOnClickListener {//防丢失
|
||||||
startActivity(Intent(this, LossPreventionActivity::class.java))
|
startActivity(Intent(this, LossPreventionActivity::class.java))
|
||||||
|
|
||||||
drawer.close()
|
drawer.close()
|
||||||
|
|
@ -819,6 +832,10 @@ class NewMainActivity : BaseActivity() {
|
||||||
drawer.openDrawer(GravityCompat.START)
|
drawer.openDrawer(GravityCompat.START)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (BuildConfig.is_tz && BuildConfig.productId == "182268") {
|
||||||
|
telegramBtn.visibility = View.INVISIBLE
|
||||||
|
fds_view.visibility = View.INVISIBLE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var checkPayResultDia: MaterialDialog? = null
|
var checkPayResultDia: MaterialDialog? = null
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import android.webkit.JavascriptInterface
|
||||||
import android.webkit.WebSettings
|
import android.webkit.WebSettings
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
import android.webkit.WebViewClient
|
import android.webkit.WebViewClient
|
||||||
|
import android.widget.Button
|
||||||
import android.widget.ProgressBar
|
import android.widget.ProgressBar
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
|
@ -54,6 +55,7 @@ import com.yingmao.clash.conf.BZYConstants.Companion.MMKV_KEY_NOTE_DEFAULT_PSW
|
||||||
import com.yingmao.clash.conf.BZYConstants.Companion.MMKV_KEY_REMEMBER_PASSWORD
|
import com.yingmao.clash.conf.BZYConstants.Companion.MMKV_KEY_REMEMBER_PASSWORD
|
||||||
import com.yingmao.clash.conf.BZYConstants.Companion.MMKV_KEY_REMEMBER_USERNAME
|
import com.yingmao.clash.conf.BZYConstants.Companion.MMKV_KEY_REMEMBER_USERNAME
|
||||||
import com.yingmao.clash.entity.CheckLoginRsp
|
import com.yingmao.clash.entity.CheckLoginRsp
|
||||||
|
import com.yingmao.clash.listener.AsyncBodyCallback
|
||||||
import com.yingmao.clash.listener.DownLoadListener
|
import com.yingmao.clash.listener.DownLoadListener
|
||||||
import com.yingmao.clash.net.http.HttpReqType
|
import com.yingmao.clash.net.http.HttpReqType
|
||||||
import com.yingmao.clash.net.http.HttpStatus
|
import com.yingmao.clash.net.http.HttpStatus
|
||||||
|
|
@ -85,11 +87,13 @@ class SplashActivity : BaseActivity() {
|
||||||
private val Captcha_REQUEST_CODE = 3333
|
private val Captcha_REQUEST_CODE = 3333
|
||||||
private lateinit var rlPb: View
|
private lateinit var rlPb: View
|
||||||
private lateinit var ll_action: View
|
private lateinit var ll_action: View
|
||||||
|
private lateinit var but_skip: Button
|
||||||
|
private lateinit var but_register: Button
|
||||||
|
|
||||||
private lateinit var rlMain: RelativeLayout
|
private lateinit var rlMain: RelativeLayout
|
||||||
|
|
||||||
private lateinit var splashAtyVM: SplashAtyVM
|
private lateinit var splashAtyVM: SplashAtyVM
|
||||||
|
private var registerHost = ""
|
||||||
companion object {
|
companion object {
|
||||||
public var registerKey = ""
|
public var registerKey = ""
|
||||||
public var registerIV2 = ""
|
public var registerIV2 = ""
|
||||||
|
|
@ -102,10 +106,7 @@ class SplashActivity : BaseActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
|
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
setLocalLanguage()
|
|
||||||
initErrMsg = resources.getString(R.string.splashErrorTips)
|
initErrMsg = resources.getString(R.string.splashErrorTips)
|
||||||
|
|
||||||
// var username2 = Utils.getUniqueID2(this);
|
// var username2 = Utils.getUniqueID2(this);
|
||||||
// com.cncat.vpn.common.log.Log.d("username==>" + username + ", username2==>" + username2)
|
// com.cncat.vpn.common.log.Log.d("username==>" + username + ", username2==>" + username2)
|
||||||
splashAtyVM = ViewModelProvider(this).get(SplashAtyVM::class.java)
|
splashAtyVM = ViewModelProvider(this).get(SplashAtyVM::class.java)
|
||||||
|
|
@ -123,14 +124,16 @@ class SplashActivity : BaseActivity() {
|
||||||
serStore.isBZY = true
|
serStore.isBZY = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
initWebView()
|
||||||
if (BuildConfig.productId == "182268") {
|
if (BuildConfig.productId == "182268") {
|
||||||
|
|
||||||
|
initAgreementPrivacy()
|
||||||
} else {
|
} else {
|
||||||
//隐私政策先授权后获取
|
//隐私政策先授权后获取权限
|
||||||
username = Utils.getUniqueID(this)
|
initApplication(false)
|
||||||
MainApplication.initUtil()
|
|
||||||
}
|
}
|
||||||
initWebView()
|
|
||||||
|
|
||||||
// mPermissions.add(Manifest.permission.READ_PHONE_STATE)
|
// mPermissions.add(Manifest.permission.READ_PHONE_STATE)
|
||||||
// mPermissions.add(Manifest.permission.INTERNET)
|
// mPermissions.add(Manifest.permission.INTERNET)
|
||||||
// mPermissions.add(Manifest.permission.ACCESS_NETWORK_STATE)
|
// mPermissions.add(Manifest.permission.ACCESS_NETWORK_STATE)
|
||||||
|
|
@ -175,6 +178,40 @@ class SplashActivity : BaseActivity() {
|
||||||
|
|
||||||
// com.cncat.vpn.common.log.Log.d("onOAIDGetComplete result==>${ DeviceIdentifier.getOAID(this)}")
|
// com.cncat.vpn.common.log.Log.d("onOAIDGetComplete result==>${ DeviceIdentifier.getOAID(this)}")
|
||||||
//获取配置背景
|
//获取配置背景
|
||||||
|
|
||||||
|
|
||||||
|
// val Sgtr= AESUtil.decrypt("6A9E6037E4E31FDFE8E09A79FAD64B5CE7AA2D6C0DF34000998651C877C8005AD68274B63FCB1FC35DAFAD278B3EF19B79E83738A3AD5DB70D9601E43050BE0E")
|
||||||
|
// println("Sgtr==>$Sgtr")
|
||||||
|
|
||||||
|
// OpenInstall.getWakeUp(intent, wakeUpAdapter)
|
||||||
|
// OpenInstall.getInstall { appData, error ->
|
||||||
|
// var appData = appData
|
||||||
|
// if (error != null && error.shouldRetry()) {
|
||||||
|
// // 获取数据异常,可以尝试重新获取
|
||||||
|
// } else {
|
||||||
|
// if (appData == null) appData = AppData()
|
||||||
|
// val channelCode = appData.getChannel() // 获取渠道编号参数
|
||||||
|
// val bindData = appData.getData() // 获取自定义参数
|
||||||
|
// Log.d("OpenInstall", "getInstall : channelCode = $channelCode"+"bindData::"+bindData)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
// private var wakeUpAdapter: AppWakeUpAdapter = object : AppWakeUpAdapter() {
|
||||||
|
// override fun onWakeUp(appData: AppData) {
|
||||||
|
// // 打印数据便于调试
|
||||||
|
// Log.d("OpenInstall", "getWakeUp : wakeupData = $appData")
|
||||||
|
// // 获取渠道编号参数
|
||||||
|
// val channelCode = appData.getChannel()
|
||||||
|
// // 获取自定义参数
|
||||||
|
// val bindData = appData.getData()
|
||||||
|
// Log.d("OpenInstall", "channelCode : bindData = $channelCode"+"bindData::"+bindData)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
private fun initApplication(isNeedRegister: Boolean) {
|
||||||
|
username = Utils.getUniqueID(this)
|
||||||
|
MainApplication.initUtil()
|
||||||
|
setLocalLanguage()
|
||||||
splashAtyVM.getSplashBg()
|
splashAtyVM.getSplashBg()
|
||||||
var clashBinder = MainApplication.getApp()?.let {
|
var clashBinder = MainApplication.getApp()?.let {
|
||||||
ClashManager(it).wrap() as IClashManager
|
ClashManager(it).wrap() as IClashManager
|
||||||
|
|
@ -208,18 +245,17 @@ class SplashActivity : BaseActivity() {
|
||||||
val routerSet =
|
val routerSet =
|
||||||
MMKV.defaultMMKV().decodeStringSet(BZYConstants.MMKV_KEY_ROUTER_HOST)
|
MMKV.defaultMMKV().decodeStringSet(BZYConstants.MMKV_KEY_ROUTER_HOST)
|
||||||
if (routerSet != null && routerSet.size > 0) {
|
if (routerSet != null && routerSet.size > 0) {
|
||||||
isNeedRegister()
|
isNeedRegister(isNeedRegister)
|
||||||
} else {
|
} else {
|
||||||
rlPb.visibility = View.VISIBLE
|
|
||||||
if (BuildConfig.is_back_cn == true) { //没有备用域名所以无需调用getHost
|
if (BuildConfig.is_back_cn == true) { //没有备用域名所以无需调用getHost
|
||||||
isNeedRegister()
|
isNeedRegister(isNeedRegister)
|
||||||
} else {
|
} else {
|
||||||
SplashHelper(splashAtyVM).getHostWithFallback { success ->
|
SplashHelper(splashAtyVM).getHostWithFallback { success ->
|
||||||
MainScope().launch {
|
MainScope().launch {
|
||||||
if (success) {
|
if (success) {
|
||||||
isNeedRegister()
|
isNeedRegister(isNeedRegister)
|
||||||
} else {
|
} else {
|
||||||
isNeedRegister()
|
isNeedRegister(isNeedRegister)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -228,33 +264,7 @@ class SplashActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// val Sgtr= AESUtil.decrypt("73CC9D719D4B46616F7FB72DBFABFA88B716D1AF0F8B8A42929F9EE5D198EB059A7934DD0074D1810CD56B5312FD5FDACC25EED6C6B2351DB11A3BF78E3010A417CDE40EEFF768849AEF25773AF541C01464DB7C9B0B7C30D36EEA414EA86F9923AAF325C15BB75170C148C4F257AA2D6A32BFB582D498B13B38E49BB8DF1663")
|
|
||||||
// println("Sgtr==>$Sgtr")
|
|
||||||
|
|
||||||
// OpenInstall.getWakeUp(intent, wakeUpAdapter)
|
|
||||||
// OpenInstall.getInstall { appData, error ->
|
|
||||||
// var appData = appData
|
|
||||||
// if (error != null && error.shouldRetry()) {
|
|
||||||
// // 获取数据异常,可以尝试重新获取
|
|
||||||
// } else {
|
|
||||||
// if (appData == null) appData = AppData()
|
|
||||||
// val channelCode = appData.getChannel() // 获取渠道编号参数
|
|
||||||
// val bindData = appData.getData() // 获取自定义参数
|
|
||||||
// Log.d("OpenInstall", "getInstall : channelCode = $channelCode"+"bindData::"+bindData)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
// private var wakeUpAdapter: AppWakeUpAdapter = object : AppWakeUpAdapter() {
|
|
||||||
// override fun onWakeUp(appData: AppData) {
|
|
||||||
// // 打印数据便于调试
|
|
||||||
// Log.d("OpenInstall", "getWakeUp : wakeupData = $appData")
|
|
||||||
// // 获取渠道编号参数
|
|
||||||
// val channelCode = appData.getChannel()
|
|
||||||
// // 获取自定义参数
|
|
||||||
// val bindData = appData.getData()
|
|
||||||
// Log.d("OpenInstall", "channelCode : bindData = $channelCode"+"bindData::"+bindData)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent?) {
|
override fun onNewIntent(intent: Intent?) {
|
||||||
super.onNewIntent(intent)
|
super.onNewIntent(intent)
|
||||||
|
|
@ -267,6 +277,12 @@ class SplashActivity : BaseActivity() {
|
||||||
var dialogAgreementPrivacyChoose: DialogAgreementPrivacyChoose? = null
|
var dialogAgreementPrivacyChoose: DialogAgreementPrivacyChoose? = null
|
||||||
private fun initAgreementPrivacy() {
|
private fun initAgreementPrivacy() {
|
||||||
if (BuildConfig.is_tz && BuildConfig.productId == "182268") {
|
if (BuildConfig.is_tz && BuildConfig.productId == "182268") {
|
||||||
|
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||||
|
rlPb.visibility = View.VISIBLE
|
||||||
|
webView.visibility = View.GONE
|
||||||
|
initApplication(false)
|
||||||
|
} else {
|
||||||
|
setWebView()
|
||||||
if (dialogAgreementPrivacyChoose == null) {
|
if (dialogAgreementPrivacyChoose == null) {
|
||||||
dialogAgreementPrivacyChoose = DialogAgreementPrivacyChoose(this@SplashActivity)
|
dialogAgreementPrivacyChoose = DialogAgreementPrivacyChoose(this@SplashActivity)
|
||||||
}
|
}
|
||||||
|
|
@ -274,8 +290,7 @@ class SplashActivity : BaseActivity() {
|
||||||
dialogAgreementPrivacyChoose?.setOnTryButtonListener(object :
|
dialogAgreementPrivacyChoose?.setOnTryButtonListener(object :
|
||||||
DialogAgreementPrivacyChoose.OnTryButtonListener {
|
DialogAgreementPrivacyChoose.OnTryButtonListener {
|
||||||
override fun agree() {
|
override fun agree() {
|
||||||
username = Utils.getUniqueID(this@SplashActivity)
|
initApplication(false)
|
||||||
MainApplication.initUtil()
|
|
||||||
dialogAgreementPrivacyChoose?.dismiss()
|
dialogAgreementPrivacyChoose?.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -286,24 +301,52 @@ class SplashActivity : BaseActivity() {
|
||||||
})
|
})
|
||||||
dialogAgreementPrivacyChoose?.show()
|
dialogAgreementPrivacyChoose?.show()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
private fun initWebView() {
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initWebView() {
|
||||||
webView = findViewById(R.id.webView)
|
webView = findViewById(R.id.webView)
|
||||||
pb_web = findViewById(R.id.pb_web)
|
pb_web = findViewById(R.id.pb_web)
|
||||||
|
but_skip = findViewById(R.id.but_skip)
|
||||||
|
but_register = findViewById(R.id.but_register)
|
||||||
|
but_skip.setOnClickListener {
|
||||||
|
val intent = Intent(this@SplashActivity, LoginActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
but_register.setOnClickListener {
|
||||||
|
if (TextUtils.isEmpty(registerHost)) {
|
||||||
|
when {
|
||||||
|
BuildConfig.is_ym -> {
|
||||||
|
getYmRegister()
|
||||||
|
}
|
||||||
|
|
||||||
if (!BuildConfig.is_ym) {
|
BuildConfig.is_tz -> {
|
||||||
|
getTzRegister()
|
||||||
|
}
|
||||||
|
|
||||||
rlPb.visibility = View.INVISIBLE
|
BuildConfig.is_yunti -> {
|
||||||
|
getYunTiRegister()
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
getBzyRegister()
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
webView.visibility = View.GONE
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("JavascriptInterface")
|
@SuppressLint("JavascriptInterface")
|
||||||
private fun setWebView() {
|
private fun setWebView() {
|
||||||
initAgreementPrivacy()
|
rlPb.visibility = View.INVISIBLE
|
||||||
|
webView.visibility = View.VISIBLE
|
||||||
|
but_skip.visibility = View.VISIBLE
|
||||||
// WebView设置
|
// WebView设置
|
||||||
val webSettings = webView.settings
|
val webSettings = webView.settings
|
||||||
// 可选,设置开启Chrome调试
|
// 可选,设置开启Chrome调试
|
||||||
|
|
@ -336,16 +379,13 @@ class SplashActivity : BaseActivity() {
|
||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public fun getVerifyResult(verifyResult: String): Boolean {
|
public fun getVerifyResult(verifyResult: String): Boolean {
|
||||||
com.cncat.vpn.common.log.Log.d("verifyResult==>${verifyResult}")
|
// com.cncat.vpn.common.log.Log.d("verifyResult==>${verifyResult}")
|
||||||
captchaInfo = verifyResult
|
captchaInfo = verifyResult
|
||||||
|
|
||||||
launch {
|
launch {
|
||||||
webView.setOnTouchListener { _, _ -> true }
|
webView.setOnTouchListener { _, _ -> true }
|
||||||
pb_web.visibility = View.VISIBLE
|
pb_web.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
doRegisterByEncryption()
|
doRegisterByEncryption()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -361,7 +401,7 @@ class SplashActivity : BaseActivity() {
|
||||||
|
|
||||||
private fun setLocalLanguage() {
|
private fun setLocalLanguage() {
|
||||||
var defLan = ""
|
var defLan = ""
|
||||||
if (BuildConfig.is_tz) {
|
if (BuildConfig.is_tz && BuildConfig.productId != "182268") {
|
||||||
defLan = "Chinese-HK"
|
defLan = "Chinese-HK"
|
||||||
}
|
}
|
||||||
val decodeString = MMKV.defaultMMKV().decodeString(BZYConstants.languageInfo, defLan)
|
val decodeString = MMKV.defaultMMKV().decodeString(BZYConstants.languageInfo, defLan)
|
||||||
|
|
@ -457,27 +497,30 @@ class SplashActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isNeedRegister() {
|
private fun isNeedRegister(isNeedRegister: Boolean) {
|
||||||
if (!BuildConfig.is_free && BuildConfig.productId.isNotEmpty()) { //渠道包都自动注册登录,广州22222也是非自动注册
|
if (!BuildConfig.is_free && BuildConfig.productId.isNotEmpty()) { //渠道包都自动注册登录,广州22222也是非自动注册
|
||||||
rlPb.visibility = View.VISIBLE
|
|
||||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||||
|
rlPb.visibility = View.VISIBLE
|
||||||
|
but_skip.visibility = View.INVISIBLE
|
||||||
splashAtyVM.checkLogin()
|
splashAtyVM.checkLogin()
|
||||||
} else {
|
} else {
|
||||||
// doRegister()
|
// doRegister()
|
||||||
if (!BuildConfig.is_ym) {
|
|
||||||
rlPb.visibility = View.INVISIBLE
|
if (isNeedRegister) {
|
||||||
webView.visibility = View.VISIBLE
|
|
||||||
setWebView()
|
|
||||||
} else {
|
|
||||||
webView.visibility = View.GONE
|
|
||||||
doRegisterByEncryption()
|
doRegisterByEncryption()
|
||||||
|
} else {
|
||||||
|
setWebView()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {//非渠道自由包
|
} else {//非渠道自由包
|
||||||
val token = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_TOKEN)
|
val token = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_TOKEN)
|
||||||
ll_action.visibility = View.VISIBLE
|
ll_action.visibility = View.VISIBLE
|
||||||
rlPb.visibility = View.INVISIBLE
|
rlPb.visibility = View.INVISIBLE
|
||||||
|
but_skip.visibility = View.INVISIBLE
|
||||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||||
|
|
||||||
if (token != null && token.isNotEmpty()) {
|
if (token != null && token.isNotEmpty()) {
|
||||||
ll_action.visibility = View.GONE
|
ll_action.visibility = View.GONE
|
||||||
rlPb.visibility = View.VISIBLE
|
rlPb.visibility = View.VISIBLE
|
||||||
|
|
@ -1016,7 +1059,7 @@ class SplashActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
if (deniedAndNoLongerPromptPermissions.isNotEmpty()) {
|
if (deniedAndNoLongerPromptPermissions.isNotEmpty()) {
|
||||||
if (checkPermissions(mPermissions)) {
|
if (checkPermissions(mPermissions)) {
|
||||||
isNeedRegister() //TODO
|
isNeedRegister(true) //TODO
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val deniedAndNoLongerPromptPermissionsName = StringBuilder()
|
val deniedAndNoLongerPromptPermissionsName = StringBuilder()
|
||||||
|
|
@ -1066,7 +1109,7 @@ class SplashActivity : BaseActivity() {
|
||||||
Logger.i("${deniedAndNoLongerPromptPermissions.size}需要${deniedAndNoLongerPromptPermissionsName.toString()}权限,由于您设置了不再提示,需要手动开启权限!")
|
Logger.i("${deniedAndNoLongerPromptPermissions.size}需要${deniedAndNoLongerPromptPermissionsName.toString()}权限,由于您设置了不再提示,需要手动开启权限!")
|
||||||
} else {
|
} else {
|
||||||
if (checkPermissions(mPermissions)) {
|
if (checkPermissions(mPermissions)) {
|
||||||
isNeedRegister() //TODO
|
isNeedRegister(true) //TODO
|
||||||
} else {
|
} else {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
@ -1079,7 +1122,7 @@ class SplashActivity : BaseActivity() {
|
||||||
com.cncat.vpn.common.log.Log.d("onActivityResult requestCode==>${requestCode}")
|
com.cncat.vpn.common.log.Log.d("onActivityResult requestCode==>${requestCode}")
|
||||||
if (requestCode == PERMISSION_SETTING_REQUEST_CODE) {
|
if (requestCode == PERMISSION_SETTING_REQUEST_CODE) {
|
||||||
if (checkPermissions(mPermissions)) {
|
if (checkPermissions(mPermissions)) {
|
||||||
isNeedRegister() //TODO
|
isNeedRegister(true) //TODO
|
||||||
} else {
|
} else {
|
||||||
requestPermissions(deniedPermissions.toTypedArray(), PERMISSION_REQUEST_CODE)
|
requestPermissions(deniedPermissions.toTypedArray(), PERMISSION_REQUEST_CODE)
|
||||||
}
|
}
|
||||||
|
|
@ -1193,4 +1236,126 @@ class SplashActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
private fun getYmRegister() {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
splashAtyVM.getRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
// mmkvHost = str
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getTzRegister() {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
splashAtyVM.getTzRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
// mmkvHost = str
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getBzyRegister() {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
splashAtyVM.getBzyRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
// mmkvHost = str
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getYunTiRegister() {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
splashAtyVM.getYunTiRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -15,10 +15,10 @@ import androidx.core.content.getSystemService
|
||||||
import com.cncat.vpn.common.Global
|
import com.cncat.vpn.common.Global
|
||||||
import com.cncat.vpn.common.compat.currentProcessName
|
import com.cncat.vpn.common.compat.currentProcessName
|
||||||
import com.cncat.vpn.common.log.Log
|
import com.cncat.vpn.common.log.Log
|
||||||
import com.fm.openinstall.OpenInstall
|
|
||||||
import com.github.gzuliyujiang.oaid.DeviceID
|
import com.github.gzuliyujiang.oaid.DeviceID
|
||||||
import com.github.gzuliyujiang.oaid.DeviceIdentifier
|
import com.github.gzuliyujiang.oaid.DeviceIdentifier
|
||||||
import com.github.gzuliyujiang.oaid.IGetter
|
import com.github.gzuliyujiang.oaid.IGetter
|
||||||
|
|
||||||
import com.jakewharton.processphoenix.ProcessPhoenix
|
import com.jakewharton.processphoenix.ProcessPhoenix
|
||||||
import com.orhanobut.logger.Logger
|
import com.orhanobut.logger.Logger
|
||||||
import com.stripe.android.PaymentConfiguration
|
import com.stripe.android.PaymentConfiguration
|
||||||
|
|
@ -93,8 +93,13 @@ class MainApplication : Application() {
|
||||||
|
|
||||||
fun initUtil() {
|
fun initUtil() {
|
||||||
getApp()?.let { mainApplication ->
|
getApp()?.let { mainApplication ->
|
||||||
|
DeviceIdentifier.register(mApp);
|
||||||
|
|
||||||
|
val processName = mainApplication.currentProcessName
|
||||||
|
mainApplication.extractGeoFiles()
|
||||||
|
Log.d("Process $processName started")
|
||||||
|
|
||||||
|
mainApplication.updateNotificationChannels()
|
||||||
/*
|
/*
|
||||||
* 错误日志上传捕获
|
* 错误日志上传捕获
|
||||||
* */
|
* */
|
||||||
|
|
@ -142,23 +147,13 @@ class MainApplication : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
mApp = this
|
mApp = this
|
||||||
// if (privacyPolicyAgreed) {
|
Global.init(mApp)
|
||||||
DeviceIdentifier.register(mApp);
|
val MMKVRootDir = MMKV.initialize(mApp)
|
||||||
// }
|
|
||||||
Global.init(this)
|
|
||||||
val processName = currentProcessName
|
|
||||||
extractGeoFiles()
|
|
||||||
Log.d("Process $processName started")
|
|
||||||
// if (processName == packageName) {
|
|
||||||
// Log.d("Remote.launch()")
|
|
||||||
// Remote.launch()
|
|
||||||
// } else {
|
|
||||||
// Log.d("sendServiceRecreated")
|
|
||||||
// sendServiceRecreated()
|
|
||||||
// }
|
|
||||||
val MMKVRootDir = MMKV.initialize(applicationContext)
|
|
||||||
Logger.i("MMKV_ROOT_DIR:$MMKVRootDir")
|
Logger.i("MMKV_ROOT_DIR:$MMKVRootDir")
|
||||||
updateNotificationChannels()
|
// if (privacyPolicyAgreed) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,20 @@ open class PublicViewMode : BaseViewMode() {
|
||||||
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
try { //TODO bug 会引起崩溃
|
try { //TODO bug 会引起崩溃
|
||||||
var host = if (BuildConfig.is_ym) {
|
val host = when {
|
||||||
rt.getHost()
|
BuildConfig.is_ym -> {
|
||||||
|
rt.getHostGithub()
|
||||||
|
}
|
||||||
|
|
||||||
} else if (BuildConfig.is_tz) {
|
BuildConfig.is_tz -> {
|
||||||
rt.getTzHostTZ()
|
rt.getTzHostGithub()
|
||||||
} else {
|
}
|
||||||
rt.getBzyHostDef()
|
BuildConfig.is_yunti -> {
|
||||||
|
rt.getYunTiHost()
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
rt.getBzyHostGithub()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Log.e("data", "2:$host")
|
// Log.e("data", "2:$host")
|
||||||
host?.takeIf { it.isNotEmpty() }?.let {
|
host?.takeIf { it.isNotEmpty() }?.let {
|
||||||
|
|
@ -71,7 +78,9 @@ open class PublicViewMode : BaseViewMode() {
|
||||||
BuildConfig.is_tz -> {
|
BuildConfig.is_tz -> {
|
||||||
rt.getTzHostGithub()
|
rt.getTzHostGithub()
|
||||||
}
|
}
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
rt.getYunTiHostGithub()
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
rt.getBzyHostGithub()
|
rt.getBzyHostGithub()
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +116,9 @@ open class PublicViewMode : BaseViewMode() {
|
||||||
BuildConfig.is_tz -> {
|
BuildConfig.is_tz -> {
|
||||||
rt.getTzHostAWS()
|
rt.getTzHostAWS()
|
||||||
}
|
}
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
rt.getYunTiHostAWS()
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
rt.getBzyHostAWS()
|
rt.getBzyHostAWS()
|
||||||
}
|
}
|
||||||
|
|
@ -223,4 +234,70 @@ open class PublicViewMode : BaseViewMode() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getYunTiKefuHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
var host = rt.getYunTiKefuHost()
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun getRegisterHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
var host = rt.getYmRegister()
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun getTzRegisterHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
var host = rt.getTzRegister()
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun getBzyRegisterHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
var host = rt.getBzyRegister()
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun getYunTiRegisterHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
var host = rt.getYuntiRegister()
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -97,6 +97,7 @@ class BZYConstants {
|
||||||
|
|
||||||
const val YMTGUrl = "https://t.me/shadowcat_vpn";
|
const val YMTGUrl = "https://t.me/shadowcat_vpn";
|
||||||
const val DefTGUrl = "https://t.me/bazhuayuvpn";
|
const val DefTGUrl = "https://t.me/bazhuayuvpn";
|
||||||
|
const val YunTiTGUrl = "https://t.me/+0GFGw9JkM8EwMGRl";
|
||||||
const val TZTGUrl = "https://t.me/taizivpn";
|
const val TZTGUrl = "https://t.me/taizivpn";
|
||||||
const val PopularApplicationsUrl = "https://2828.im/"
|
const val PopularApplicationsUrl = "https://2828.im/"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -470,12 +470,20 @@ class SettingFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatc
|
||||||
clTelegraph.setOnClickListener {
|
clTelegraph.setOnClickListener {
|
||||||
var uri = Uri.parse(BZYConstants.DefTGUrl)
|
var uri = Uri.parse(BZYConstants.DefTGUrl)
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
if (BuildConfig.is_tz) {
|
when {
|
||||||
uri = Uri.parse(BZYConstants.TZTGUrl)
|
BuildConfig.is_ym -> {
|
||||||
} else {
|
|
||||||
if (BuildConfig.is_ym) {
|
|
||||||
uri = Uri.parse(BZYConstants.YMTGUrl)
|
uri = Uri.parse(BZYConstants.YMTGUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_tz -> {
|
||||||
|
uri = Uri.parse(BZYConstants.TZTGUrl)
|
||||||
|
}
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
uri = Uri.parse(BZYConstants.YunTiTGUrl)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
uri = Uri.parse(BZYConstants.DefTGUrl)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
intent.setData(uri)
|
intent.setData(uri)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,13 @@ interface HttpApi {
|
||||||
suspend fun getTzHostAWS(): String
|
suspend fun getTzHostAWS(): String
|
||||||
@GET("/ym-source/ym/main/hosttaizi.txt")
|
@GET("/ym-source/ym/main/hosttaizi.txt")
|
||||||
suspend fun getTzHostGithub(): String
|
suspend fun getTzHostGithub(): String
|
||||||
|
//云梯
|
||||||
|
@GET("/host_yunti.txt")
|
||||||
|
suspend fun getYunTiHost(): String
|
||||||
|
@GET("/host_yunti.txt")
|
||||||
|
suspend fun getYunTiHostAWS(): String
|
||||||
|
@GET("/ym-source/ym/main/host_yunti.txt")
|
||||||
|
suspend fun getYunTiHostGithub(): String
|
||||||
//注册链接
|
//注册链接
|
||||||
@GET("/ymregister.txt")
|
@GET("/ymregister.txt")
|
||||||
suspend fun getYmRegister(): String
|
suspend fun getYmRegister(): String
|
||||||
|
|
@ -195,6 +201,8 @@ interface HttpApi {
|
||||||
suspend fun getTzRegister(): String
|
suspend fun getTzRegister(): String
|
||||||
@GET("/bzyregister.txt")
|
@GET("/bzyregister.txt")
|
||||||
suspend fun getBzyRegister(): String
|
suspend fun getBzyRegister(): String
|
||||||
|
@GET("/yunti_register.txt")
|
||||||
|
suspend fun getYuntiRegister(): String
|
||||||
//客服链接
|
//客服链接
|
||||||
@GET("/ymkefu.txt")
|
@GET("/ymkefu.txt")
|
||||||
suspend fun getYingMaoKefuHost(): String
|
suspend fun getYingMaoKefuHost(): String
|
||||||
|
|
@ -204,6 +212,9 @@ interface HttpApi {
|
||||||
|
|
||||||
@GET("/bzy_kefu.txt")
|
@GET("/bzy_kefu.txt")
|
||||||
suspend fun getBzyKefuHost(): String
|
suspend fun getBzyKefuHost(): String
|
||||||
|
|
||||||
|
@GET("/yt_kefu.txt")
|
||||||
|
suspend fun getYunTiKefuHost(): String
|
||||||
// @Headers(
|
// @Headers(
|
||||||
// "User-Agent: Octopus_Android"
|
// "User-Agent: Octopus_Android"
|
||||||
// )
|
// )
|
||||||
|
|
|
||||||
|
|
@ -96,45 +96,7 @@ class LoginAtyVM : PublicViewMode() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRegisterHost(callback: AsyncBodyCallback) {
|
|
||||||
val rt =
|
|
||||||
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
|
||||||
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
|
||||||
try { //TODO bug 会引起崩溃
|
|
||||||
var host = rt.getYmRegister()
|
|
||||||
callback.suc(host)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
callback.err()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fun getTzRegisterHost(callback: AsyncBodyCallback) {
|
|
||||||
val rt =
|
|
||||||
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
|
||||||
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
|
||||||
try { //TODO bug 会引起崩溃
|
|
||||||
var host = rt.getTzRegister()
|
|
||||||
callback.suc(host)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
callback.err()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fun getBzyRegisterHost(callback: AsyncBodyCallback) {
|
|
||||||
val rt =
|
|
||||||
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
|
||||||
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
|
||||||
try { //TODO bug 会引起崩溃
|
|
||||||
var host = rt.getBzyRegister()
|
|
||||||
callback.suc(host)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
callback.err()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fun upgradeVersion() {
|
fun upgradeVersion() {
|
||||||
val httpApi = NetService.instances.createHttpsEncodeStr(HttpApi::class.java)
|
val httpApi = NetService.instances.createHttpsEncodeStr(HttpApi::class.java)
|
||||||
val phoneNumber =
|
val phoneNumber =
|
||||||
|
|
|
||||||
|
|
@ -84,14 +84,21 @@ class BZYWebViewKeFu : BaseActivity() {
|
||||||
//// Log.e("data", "==$newProgress")
|
//// Log.e("data", "==$newProgress")
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if (BuildConfig.is_tz) {
|
|
||||||
// webView.loadUrl("file:///android_asset/TZKeFu.html")
|
when {
|
||||||
getTzKefu()
|
BuildConfig.is_ym -> {
|
||||||
} else {
|
|
||||||
if (BuildConfig.is_ym) {
|
|
||||||
ymKefu()
|
ymKefu()
|
||||||
} else {
|
}
|
||||||
// webView.loadUrl("file:///android_asset/kefu.html")
|
|
||||||
|
BuildConfig.is_tz -> {
|
||||||
|
getTzKefu()
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
getYunTiKefu()
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
getBzyKefu()
|
getBzyKefu()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +155,7 @@ class BZYWebViewKeFu : BaseActivity() {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getBzyKefu() {
|
private fun getBzyKefu() {
|
||||||
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")
|
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")
|
||||||
var enNmae = URLEncoder.encode(userName, "UTF-8")
|
var enNmae = URLEncoder.encode(userName, "UTF-8")
|
||||||
|
|
@ -197,6 +205,7 @@ class BZYWebViewKeFu : BaseActivity() {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getTzKefu() {
|
private fun getTzKefu() {
|
||||||
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")
|
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")
|
||||||
var enNmae = URLEncoder.encode(userName, "UTF-8")
|
var enNmae = URLEncoder.encode(userName, "UTF-8")
|
||||||
|
|
@ -246,4 +255,53 @@ class BZYWebViewKeFu : BaseActivity() {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getYunTiKefu() {
|
||||||
|
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")
|
||||||
|
var enNmae = URLEncoder.encode(userName, "UTF-8")
|
||||||
|
Log.d("enNmae==>${enNmae}")
|
||||||
|
if (TextUtils.isEmpty(kefuHost)) {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_KEFU_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost kf ==>${mmkvHost}")
|
||||||
|
webViewAtyVM.getYunTiKefuHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_KEFU_HOST, str)
|
||||||
|
}
|
||||||
|
kefuHost = str
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(str + "&app_account=${enNmae}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
if (!TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost + "&app_account=${enNmae}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(kefuHost + "&app_account=${enNmae}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dialog_agreement_info"
|
android:id="@+id/dialog_agreement_info"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,77 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/rlMain"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/splash_background"
|
android:background="@drawable/splash_background"
|
||||||
tools:context=".act.SplashActivity"
|
tools:context=".act.SplashActivity">
|
||||||
android:id="@+id/rlMain"
|
|
||||||
>
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
</TextView>
|
||||||
|
|
||||||
<WebView
|
<WebView
|
||||||
android:id="@+id/webView"
|
android:id="@+id/webView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="invisible"
|
|
||||||
android:background="@color/main_bg"
|
android:background="@color/main_bg"
|
||||||
/>
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/pb_web"
|
android:id="@+id/pb_web"
|
||||||
android:visibility="invisible"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminateTint="@color/blue_0136CB" />
|
android:layout_centerInParent="true"
|
||||||
</RelativeLayout>
|
android:indeterminateTint="@color/blue_0136CB"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginBottom="@dimen/dp_40"
|
||||||
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/but_skip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/login_btn_bg_selector"
|
||||||
|
android:text="@string/skip"
|
||||||
|
android:visibility="visible">
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/but_register"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/login_btn_bg_selector"
|
||||||
|
android:text="@string/email_or_phone_register"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
</Button>
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/ll_action"
|
android:id="@+id/ll_action"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
@ -42,7 +81,7 @@
|
||||||
android:layout_marginRight="@dimen/dp_10"
|
android:layout_marginRight="@dimen/dp_10"
|
||||||
android:layout_marginBottom="50dp"
|
android:layout_marginBottom="50dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
>
|
android:visibility="gone">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_action_login"
|
android:id="@+id/rl_action_login"
|
||||||
|
|
@ -51,10 +90,10 @@
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:id="@+id/iv_login"
|
android:id="@+id/iv_login"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
android:src="@mipmap/action_login" />
|
android:src="@mipmap/action_login" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -72,11 +111,11 @@
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/rl_action_register"
|
android:id="@+id/rl_action_register"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_register"
|
android:id="@+id/iv_register"
|
||||||
|
|
@ -120,8 +159,8 @@
|
||||||
android:layout_below="@id/pb"
|
android:layout_below="@id/pb"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:text="@string/LoadingProgress"
|
android:text="@string/LoadingProgress"
|
||||||
android:textSize="15sp"
|
android:textColor="@color/blue_0136CB"
|
||||||
android:textColor="@color/blue_0136CB" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 688 B |
Binary file not shown.
|
After Width: | Height: | Size: 380 B |
Binary file not shown.
|
After Width: | Height: | Size: 962 B |
|
|
@ -4,6 +4,7 @@
|
||||||
<string name="app_name_gz">影猫</string>
|
<string name="app_name_gz">影猫</string>
|
||||||
<string name="app_name_gz2">影猫加速器</string>
|
<string name="app_name_gz2">影猫加速器</string>
|
||||||
<string name="app_name_taizi">太子</string>
|
<string name="app_name_taizi">太子</string>
|
||||||
|
<string name="app_name_yunti">云梯加速器</string>
|
||||||
<string name="file">file</string>
|
<string name="file">file</string>
|
||||||
<string name="rule">rule</string>
|
<string name="rule">rule</string>
|
||||||
<string name="proxy">proxy</string>
|
<string name="proxy">proxy</string>
|
||||||
|
|
@ -353,4 +354,6 @@ Service Description\n
|
||||||
<string name="node_item_test">Speed test</string>
|
<string name="node_item_test">Speed test</string>
|
||||||
<string name="agree">Agree</string>
|
<string name="agree">Agree</string>
|
||||||
<string name="disagree">Disagree</string>
|
<string name="disagree">Disagree</string>
|
||||||
|
<string name="skip">Go to login</string>
|
||||||
|
<string name="email_or_phone_register">Email registration</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -343,4 +343,7 @@
|
||||||
<string name="node_item_test">線路測速</string>
|
<string name="node_item_test">線路測速</string>
|
||||||
<string name="agree">同意</string>
|
<string name="agree">同意</string>
|
||||||
<string name="disagree">不同意</string>
|
<string name="disagree">不同意</string>
|
||||||
|
<string name="skip">前往登入</string>
|
||||||
|
<string name="app_name_yunti">雲梯加速器</string>
|
||||||
|
<string name="email_or_phone_register">郵箱註冊</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -342,4 +342,7 @@
|
||||||
<string name="node_item_test">線路測速</string>
|
<string name="node_item_test">線路測速</string>
|
||||||
<string name="agree">同意</string>
|
<string name="agree">同意</string>
|
||||||
<string name="disagree">不同意</string>
|
<string name="disagree">不同意</string>
|
||||||
|
<string name="skip">前往登入</string>
|
||||||
|
<string name="app_name_yunti">雲梯加速器</string>
|
||||||
|
<string name="email_or_phone_register">郵箱註冊</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -362,4 +362,8 @@
|
||||||
<string name="node_item_test">线路测速</string>
|
<string name="node_item_test">线路测速</string>
|
||||||
<string name="agree">同意</string>
|
<string name="agree">同意</string>
|
||||||
<string name="disagree">不同意</string>
|
<string name="disagree">不同意</string>
|
||||||
|
<string name="skip">前往登录</string>
|
||||||
|
|
||||||
|
<string name="app_name_yunti">云梯加速器</string>
|
||||||
|
<string name="email_or_phone_register">邮箱注册</string>
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue