mirror of
https://github.com/SagerNet/sing-box-for-android.git
synced 2025-04-03 20:07: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")
|
||||
return
|
||||
}
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
|
||||
Log.d(TAG, "skip app update")
|
||||
return
|
||||
}
|
||||
val perAppProxyUpdateOnChange = Settings.perAppProxyUpdateOnChange
|
||||
if (perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_DISABLED) {
|
||||
Log.d(TAG, "update on change disabled")
|
||||
|
@ -36,10 +40,10 @@ class AppChangeReceiver : BroadcastReceiver() {
|
|||
val isChinaApp = PerAppProxyActivity.scanChinaApps(listOf(packageName)).isNotEmpty()
|
||||
Log.d(TAG, "scan china app result for $packageName: $isChinaApp")
|
||||
if ((perAppProxyUpdateOnChange == Settings.PER_APP_PROXY_INCLUDE) xor !isChinaApp) {
|
||||
Settings.perAppProxyList = Settings.perAppProxyList + packageName
|
||||
Settings.perAppProxyList += packageName
|
||||
Log.d(TAG, "added to list")
|
||||
} else {
|
||||
Settings.perAppProxyList = Settings.perAppProxyList - packageName
|
||||
Settings.perAppProxyList -= packageName
|
||||
Log.d(TAG, "removed from list")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue