一键连更新

This commit is contained in:
11111 2026-01-16 14:06:00 +08:00
parent 079aecd4aa
commit b7e93673f1
13 changed files with 40 additions and 112 deletions

View File

@ -9,8 +9,6 @@ plugins {
id("kotlin-parcelize")
id("com.google.devtools.ksp")
id("kotlinx-serialization")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
}
@ -18,14 +16,6 @@ dependencies {
implementation(fileTree(mapOf("dir" to "src/main/libs", "include" to listOf("*.aar"))))
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation(files("src\\main\\libs\\Baidu_ocpc_action_2_7_2.aar"))
// implementation(files("src\\main\\libs\\OpenInstall.jar"))
// implementation("com.google.firebase:firebase-crashlytics-buildtools:3.0.2")
// implementation(files("src/main/libs/openinstall.jar"))
// compileOnly(project(":hideapi"))
// implementation(project(":core"))
// implementation(project(":service"))
// implementation(project(":common"))
ksp(libs.kaidl.compiler)
ksp(libs.androidx.room.compiler)
implementation(libs.kotlin.coroutine)
@ -104,19 +94,9 @@ dependencies {
// https://mvnrepository.com/artifact/com.alipay.sdk/alipaysdk-android
implementation("com.alipay.sdk:alipaysdk-android:15.8.17")
// https://mvnrepository.com/artifact/com.journeyapps/zxing-android-embedded
// implementation("com.journeyapps:zxing-android-embedded:3.6.0")
// https://mvnrepository.com/artifact/com.google.zxing/core
// implementation("com.google.zxing:core:3.5.3")
implementation("com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4")
// https://mvnrepository.com/artifact/com.airbnb.android/lottie
implementation("com.airbnb.android:lottie:5.2.0")
// https://mvnrepository.com/artifact/com.github.bumptech.glide/glide
implementation("com.github.bumptech.glide:glide:4.13.2")
// implementation("com.luozm.captcha:captcha:1.1.2")
// implementation("com.aliyun.dpa:oss-android-sdk:2.9.19")
// implementation ("com.hihonor.mcs:ads-identifier:1.0.3.301")
implementation("com.github.gzu-liyujiang:Android_CN_OAID:4.2.8") {
exclude("com.hihonor.mcs", "ads-identifier")
exclude("com.huawei.hms", "ads-identifier")
@ -126,15 +106,8 @@ dependencies {
// // 荣耀的最新版本广告标识服务SDK参阅 https://developer.hihonor.com/cn/kitdoc?kitId=11030&navigation=guides&docId=intergrate.md
api ("com.hihonor.mcs:ads-identifier:1.0.2.301")
//stripe 支付
implementation("com.stripe:stripe-android:21.4.2")// 使用最新版本
implementation("com.github.getActivity:XXPermissions:20.0")
implementation("com.android.installreferrer:installreferrer:2.2")// 使用最新版本
implementation("io.github.youth5201314:banner:2.2.3")
implementation("com.github.zhpanvip:viewpagerindicator:1.2.3")
implementation(platform("com.google.firebase:firebase-bom:34.7.0"))
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-crashlytics")
}

View File

@ -1,29 +0,0 @@
{
"project_info": {
"project_number": "321336299306",
"project_id": "yijianlian-3e318",
"storage_bucket": "yijianlian-3e318.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:321336299306:android:572d539bef07b6718b9853",
"android_client_info": {
"package_name": "com.jsq.wufu"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyABfmUvnqxSjzg6KAmDiRdvzfPC6f3zO-w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

View File

@ -287,7 +287,3 @@
-keep class com.yingmao.clash.entity.** { *; }
-keep class com.stripe.** { *; }
-keep class kotlin.coroutines.Continuation
-keepattributes SourceFile,LineNumberTable
-keep class com.google.firebase.crashlytics.** { *; }
-keep class com.google.firebase.analytics.** { *; }

View File

@ -227,7 +227,7 @@ class ActivityActivity : BaseActivity() {
val expensesRecordList = getActivityRsp.data.data.list
if (!expensesRecordList.isNullOrEmpty()) {
if (mPageInfo.isFirstPage) {
getActivityAdapter.addData(expensesRecordList)
getActivityAdapter.setNewInstance(expensesRecordList)
} else {
getActivityAdapter.addData(expensesRecordList)
}

View File

@ -110,7 +110,7 @@ class ExpensesRecordActivity : BaseActivity() {
val expensesRecordList =expensesRecordRsp.data?.expensesRecords
if(!expensesRecordList.isNullOrEmpty()){
if(mPageInfo.isFirstPage) {
expensesRecordAdapter.addData(expensesRecordList)
expensesRecordAdapter.setNewInstance(expensesRecordList)
}else{
expensesRecordAdapter.addData(expensesRecordList)
}

View File

@ -60,6 +60,7 @@ import com.yingmao.clash.net.http.NetService
import com.yingmao.clash.net.http.entity.AppVersionCheckRsp
import com.yingmao.clash.net.http.entity.ExpensesRecordRsp
import com.yingmao.clash.net.http.entity.GetActivityRsp
import com.yingmao.clash.net.http.entity.HeartBeatRsp
import com.yingmao.clash.net.http.entity.PhDownloadUrlRsp
import com.yingmao.clash.net.http.entity.SubscriptionRsp
import com.yingmao.clash.remote.Remote
@ -341,6 +342,29 @@ class MainActivity : BaseActivity() {
@RequiresApi(Build.VERSION_CODES.O)
override fun httpSuccess(httpStatus: HttpStatus.Success) {
when (httpStatus.reqType) {
HttpReqType.HEARTBEAT->{
Log.i("心跳成功")
(httpStatus.rsp as HeartBeatRsp).let {
AppLog.i("MainActivity", "httpSuccess HttpReqType.HEARTBEAT ${it.code}")
when (it.code) {
0 -> {
goCheckLogin()
}
-2 -> {
cleanUserInfo()
}
-4 -> {
cleanUserInfo()
}
-3 -> {
goCheckLogin()
}
}
}
}
HttpReqType.GET_AIRNODES -> {
val data = httpStatus.rsp as SubscriptionRsp
AppLog.i("SplashActivity", "httpSuccess HttpReqType.GET_AIRNODES ${data}")
@ -627,7 +651,14 @@ class MainActivity : BaseActivity() {
}
}
override fun onBackPressed() {
val backHome = Intent(Intent.ACTION_MAIN)
backHome.flags = Intent.FLAG_ACTIVITY_NEW_TASK
backHome.addCategory(Intent.CATEGORY_HOME)
startActivity(backHome)
return
super.onBackPressed()
}
private fun startLog() {

View File

@ -16,8 +16,6 @@ import com.cncat.vpn.common.log.Log
import com.github.gzuliyujiang.oaid.DeviceID
import com.github.gzuliyujiang.oaid.DeviceIdentifier
import com.github.gzuliyujiang.oaid.IGetter
import com.google.firebase.FirebaseApp
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.jakewharton.processphoenix.ProcessPhoenix
import com.orhanobut.logger.Logger
import com.stripe.android.PaymentConfiguration
@ -29,7 +27,6 @@ import com.yingmao.clash.levellog.LogDispatcher
import com.yingmao.clash.levellog.LogEvent
import com.yingmao.clash.levellog.LogFileWriter
import com.yingmao.clash.levellog.LogLevel
import com.yingmao.clash.util.CrashCatchHandler
import com.yingmao.clash.util.clashDir
import com.yingmao.clash.view.dialog.DialogSureRestartChoose
import kotlinx.coroutines.MainScope
@ -162,9 +159,6 @@ class MainApplication : Application() {
// 给日志落盘时间
try { Thread.sleep(200) } catch (_: Exception) {}
}
FirebaseApp.initializeApp(mApp)
//允许上报错误日志
FirebaseCrashlytics.getInstance().isCrashlyticsCollectionEnabled = true
}
private fun extractGeoFiles() {
clashDir.mkdirs()

View File

@ -411,31 +411,6 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
}
private fun startClash(isStart: Boolean) {
//这里需要判断一下config.yaml文件是否存在
launch {
profileBinder?.let {profileManager ->
val pro = profileManager.queryAll().find {
it.name == Conf.getClashConfName(MainApplication.getApp()?.applicationContext)
}
val importConfig = requireActivity().importedDir
.resolve(pro?.uuid.toString())
.resolve("config.yaml")
val pendingConfig = requireActivity().processingDir
.resolve("config.yaml")
val importConfigCheck = isFileContentEmpty(importConfig)
val pendingConfigCheck = isFileContentEmpty(pendingConfig)
AppLog.i("NewAccFragment", "importConfigCheck:${importConfigCheck} pendingConfigCheck::${pendingConfigCheck} ")
if(importConfigCheck||pendingConfigCheck){
profileManager.queryAll().forEach { profile ->
profileManager.delete(profile.uuid)
}
setSub2(subUrl!!)
}
}
}
AppLog.i("NewAccFragment", "onClick startClash()")
val nodeJson=serStore.nodes
Log.d("nodeJson: ${nodeJson.isEmpty()}")

View File

@ -111,11 +111,11 @@ class CustomerServiceWebView:BaseActivity() {
.encode(BZYConstants.MMKV_KEY_KEFU_HOST, str)
}
customerServiceHost = str
csWebView.loadUrl(str+"&app_account=${enName}"+"&app_t=${resources.getString(R.string.yijianlianCustom)}"+"&app_v=${BuildConfig.VERSION_NAME}."+BuildConfig.productId)
csWebView.loadUrl(str+"&app_account=${enName}"+"&app_t=${resources.getString(R.string.yijianlian)}"+"&app_v=${BuildConfig.VERSION_NAME}."+BuildConfig.productId)
}
}
} else {
csWebView.loadUrl(customerServiceHost + "&app_account=${enName}"+"&app_t=${resources.getString(R.string.yijianlianCustom)}"+"&app_v=${BuildConfig.VERSION_NAME}."+BuildConfig.productId)
csWebView.loadUrl(customerServiceHost + "&app_account=${enName}"+"&app_t=${resources.getString(R.string.yijianlian)}"+"&app_v=${BuildConfig.VERSION_NAME}."+BuildConfig.productId)
}
initKeyboardListener()
}

View File

@ -422,7 +422,6 @@
<string name="tooFast">应用初始化中,请等待1~2秒后重试</string>
<string name="Starting">启动中</string>
<string name="yijianlian">一键连</string>
<string name="yijianlianCustom">二建连客服</string>
<string name="PaySuccessful">支付成功</string>
<string name="PayError">支付失败:</string>
<string name="payDelayStr">\u3000\u3000您的支付订单已成功完成目前平台正在处理中。通常情况下到账会有几秒钟的延迟请您稍作等待。如您已返回应用首页建议等待片刻后手动刷新页面以便更新状态。若几分钟后仍未到账请及时联系客服人员为您处理。感谢您的支持与信任</string>

View File

@ -3,13 +3,6 @@
import com.android.build.gradle.BaseExtension
import java.net.URL
import java.util.*
plugins {
// ...
// Add the dependency for the Google services Gradle plugin
id("com.google.gms.google-services") version "4.4.4" apply false
id("com.google.firebase.crashlytics") version "3.0.6" apply false
}
buildscript {
val agp_version by extra("7.4.1")
repositories {

3
proguard-rules.pro vendored
View File

@ -277,6 +277,3 @@
-keep class com.journeyapps.barcodescanner.** { *; }
-keep class com.afollestad.materialdialogs.** { *; }
-keepattributes SourceFile,LineNumberTable
-keep class com.google.firebase.crashlytics.** { *; }
-keep class com.google.firebase.analytics.** { *; }

View File

@ -4,7 +4,6 @@ include(":app")
pluginManagement {
repositories {
google()
mavenLocal()
mavenCentral()
gradlePluginPortal()
@ -17,8 +16,8 @@ dependencyResolutionManagement {
versionCatalogs {
create("libs") {
val agp = "8.2.0"
val kotlin = "2.1.0"
val ksp = "$kotlin-1.0.29"
val kotlin = "1.9.0"
val ksp = "$kotlin-1.0.13"
val golang = "1.0.4"
val coroutine = "1.7.3"
val coreKtx = "1.8.0"