马上连注册新增oaid
This commit is contained in:
parent
7a2a1cfcb2
commit
e6cdf3b766
|
|
@ -48,6 +48,7 @@ import com.yingmao.clash.net.http.entity.Trade
|
|||
import com.yingmao.clash.util.CommonUtils
|
||||
import com.yingmao.clash.util.PayUtils
|
||||
import com.yingmao.clash.util.ThreadUtils
|
||||
import com.yingmao.clash.util.stopClashService
|
||||
import com.yingmao.clash.view.RxToast
|
||||
import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
||||
import com.yingmao.clash.view.dialog.PayConfirmDialog
|
||||
|
|
@ -594,7 +595,7 @@ class MemberRechargeActivity : BaseActivity() {
|
|||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_Switch_Finsh_Set)
|
||||
Log.d("cleanUserInfo clashRunning==>$clashRunning")
|
||||
if (clashRunning) {
|
||||
NewAccFragment().stopClash()
|
||||
stopClashService()
|
||||
}
|
||||
isSubbed =false
|
||||
mainAtyVM.stopHeartBeat()
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ import com.yingmao.clash.remote.Remote
|
|||
import com.yingmao.clash.util.AESUtil
|
||||
import com.yingmao.clash.util.CommonUtils
|
||||
import com.yingmao.clash.util.Utils
|
||||
import com.yingmao.clash.util.stopClashService
|
||||
import com.yingmao.clash.view.RxToast
|
||||
import com.yingmao.clash.view.adapter.MainVPAdapter
|
||||
import com.yingmao.clash.view.dialog.ActivityViewDialog
|
||||
|
|
@ -789,7 +790,7 @@ class NewMainActivity : BaseActivity() {
|
|||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_Switch_Finsh_Set)
|
||||
Log.d("cleanUserInfo clashRunning==>${clashRunning}")
|
||||
if (clashRunning) {
|
||||
fragments.filterIsInstance<NewAccFragment>().forEach { it.stopClash() }
|
||||
stopClashService()
|
||||
}
|
||||
isSubbed=false
|
||||
stopUploadTimer()
|
||||
|
|
@ -1040,9 +1041,10 @@ class NewMainActivity : BaseActivity() {
|
|||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_VPN_UserCommand)
|
||||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.NODE_All_ITEM_NAME_KEY)
|
||||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.PROFILE_SUB_URL)
|
||||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_Switch_Finsh_Set)
|
||||
Log.d("cleanUserInfo clashRunning==>${clashRunning}")
|
||||
if (clashRunning) {
|
||||
fragments.filterIsInstance<NewAccFragment>().forEach { it.stopClash() }
|
||||
stopClashService()
|
||||
}
|
||||
isSubbed=false
|
||||
stopUploadTimer()
|
||||
|
|
|
|||
|
|
@ -344,9 +344,6 @@ class SettingActivity : BaseActivity() {
|
|||
}catch (e:Exception){
|
||||
android.util.Log.i("ErrorInfo","err::"+e.printStackTrace())
|
||||
}
|
||||
// val intent=Intent(CommonUtils.getApp(), SplashActivity::class.java)
|
||||
// intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
// startActivity(intent)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
|
|
@ -574,6 +574,23 @@ class SplashActivity : BaseActivity() {
|
|||
|
||||
@Synchronized
|
||||
fun doRegisterByEncryption() {
|
||||
val webView = WebView(this@SplashActivity)
|
||||
val userAgent = webView.settings.userAgentString
|
||||
var oaId=OAID
|
||||
Log.i("SplashRegister","OAID::"+OAID+"oaId.isEmpty()::"+oaId.isEmpty())
|
||||
if(oaId.isEmpty()){
|
||||
DeviceID.getOAID(this, object : IGetter {
|
||||
override fun onOAIDGetComplete(result: String) {
|
||||
Log.i("SplashRegister","result::"+result)
|
||||
oaId=result
|
||||
}
|
||||
override fun onOAIDGetError(error: Exception) {
|
||||
// 获取OAID/AAID失败
|
||||
com.cncat.vpn.common.log.Log.d("OAID 获取失败 ${error}")
|
||||
error.printStackTrace()
|
||||
}
|
||||
})
|
||||
}
|
||||
var req_json = JsonObject()
|
||||
req_json.addProperty("password", BZYConstants.defaultPassword)
|
||||
req_json.addProperty("checkPassword", BZYConstants.defaultPassword)
|
||||
|
|
@ -581,6 +598,8 @@ class SplashActivity : BaseActivity() {
|
|||
req_json.addProperty("clientIp", "127.0.0.1")
|
||||
req_json.addProperty("from", "5")
|
||||
req_json.addProperty("androidDevice", username)
|
||||
req_json.addProperty("userAgent", userAgent)
|
||||
req_json.addProperty("oaid", oaId)
|
||||
if (captchaInfo.isNotEmpty()) {
|
||||
req_json.addProperty("captchaVerifyParam", captchaInfo)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ subprojects {
|
|||
}
|
||||
productFlavors {
|
||||
flavorDimensions("feature")
|
||||
create("3033") {
|
||||
create("1101") {
|
||||
isDefault = true
|
||||
dimension = flavorDimensionList[0]
|
||||
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
|
||||
|
|
@ -111,7 +111,26 @@ subprojects {
|
|||
buildConfigField("String", "applicationId", "\"com.jsq.mashanglian\"")
|
||||
buildConfigField("String", "service_url", "\"https://api.wfvpnpro.com/\"")
|
||||
buildConfigField("boolean", "is_free", "false")
|
||||
buildConfigField("String", "productId", "\"3033\"")
|
||||
buildConfigField("String", "productId", "\"1101\"")
|
||||
manifestPlaceholders(
|
||||
mapOf(
|
||||
"APP_NAME" to "@string/ConnectImmediately",
|
||||
"APP_ICON" to "@mipmap/logo_connect_immediately"
|
||||
)
|
||||
)
|
||||
}
|
||||
create("1102") {
|
||||
isDefault = true
|
||||
dimension = flavorDimensionList[0]
|
||||
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
|
||||
buildConfigField("boolean", "is_back_cn", "false")
|
||||
buildConfigField("boolean", "is_ym", "true")
|
||||
buildConfigField("boolean", "is_tz", "false")
|
||||
buildConfigField("boolean", "is_yunti", "false")
|
||||
buildConfigField("String", "applicationId", "\"com.jsq.mashanglian\"")
|
||||
buildConfigField("String", "service_url", "\"https://api.wfvpnpro.com/\"")
|
||||
buildConfigField("boolean", "is_free", "false")
|
||||
buildConfigField("String", "productId", "\"1102\"")
|
||||
manifestPlaceholders(
|
||||
mapOf(
|
||||
"APP_NAME" to "@string/ConnectImmediately",
|
||||
|
|
@ -122,7 +141,7 @@ subprojects {
|
|||
|
||||
}
|
||||
sourceSets {
|
||||
getByName("3033") {
|
||||
getByName("1102") {
|
||||
java.srcDirs("src/foss/java")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue