mirror of
https://github.com/SagerNet/sing-box-for-android.git
synced 2025-04-05 12:57:38 +03:00
Remove china app check for updated apps
This commit is contained in:
parent
77ab22ee71
commit
953a0bee72
1 changed files with 6 additions and 2 deletions
|
@ -23,6 +23,10 @@ class AppChangeReceiver : BroadcastReceiver() {
|
||||||
Log.d(TAG, "per app proxy disabled")
|
Log.d(TAG, "per app proxy disabled")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
|
||||||
|
Log.d(TAG, "skip app update")
|
||||||
|
return
|
||||||
|
}
|
||||||
val perAppProxyUpdateOnChange = Settings.perAppProxyUpdateOnChange
|
val perAppProxyUpdateOnChange = Settings.perAppProxyUpdateOnChange
|
||||||
if (perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_DISABLED) {
|
if (perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_DISABLED) {
|
||||||
Log.d(TAG, "update on change disabled")
|
Log.d(TAG, "update on change disabled")
|
||||||
|
@ -36,10 +40,10 @@ class AppChangeReceiver : BroadcastReceiver() {
|
||||||
val isChinaApp = PerAppProxyActivity.scanChinaApps(listOf(packageName)).isNotEmpty()
|
val isChinaApp = PerAppProxyActivity.scanChinaApps(listOf(packageName)).isNotEmpty()
|
||||||
Log.d(TAG, "scan china app result for $packageName: $isChinaApp")
|
Log.d(TAG, "scan china app result for $packageName: $isChinaApp")
|
||||||
if ((perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_INCLUDE) xor !isChinaApp) {
|
if ((perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_INCLUDE) xor !isChinaApp) {
|
||||||
Settings.perAppProxyList = Settings.perAppProxyList + packageName
|
Settings.perAppProxyList += packageName
|
||||||
Log.d(TAG, "added to list")
|
Log.d(TAG, "added to list")
|
||||||
} else {
|
} else {
|
||||||
Settings.perAppProxyList = Settings.perAppProxyList - packageName
|
Settings.perAppProxyList -= packageName
|
||||||
Log.d(TAG, "removed from list")
|
Log.d(TAG, "removed from list")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue