Add config override and per-app proxy feature

This commit is contained in:
iKirby
2023-07-27 22:17:25 +08:00
committed by 世界
parent af0046ce1c
commit 9575764f40
25 changed files with 1052 additions and 17 deletions

View File

@@ -3,10 +3,13 @@ package io.nekohasekai.sfa
import android.app.Application
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.ConnectivityManager
import android.os.PowerManager
import androidx.core.content.getSystemService
import go.Seq
import io.nekohasekai.sfa.bg.AppChangeReceiver
import io.nekohasekai.sfa.bg.UpdateProfileWork
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@@ -29,6 +32,11 @@ class Application : Application() {
GlobalScope.launch(Dispatchers.IO) {
UpdateProfileWork.reconfigureUpdater()
}
registerReceiver(AppChangeReceiver(), IntentFilter().apply {
addAction(Intent.ACTION_PACKAGE_ADDED)
addDataScheme("package")
})
}
companion object {