Commit 5da2fef6 authored by shadowsocksRb's avatar shadowsocksRb Committed by Mygod

Optimization AppManager UI (#2335)

* Show disabled apps in the app list;
* Apply bypass setting to other profiles as well.

(cherry picked from commit 8306daa8b5f08f6e9c8fd85d03db974ad100caae)
parent 42f507ec
...@@ -78,7 +78,8 @@ class AppManager : AppCompatActivity() { ...@@ -78,7 +78,8 @@ class AppManager : AppCompatActivity() {
instance?.loadApps() instance?.loadApps()
} }
// Labels and icons can change on configuration (locale, etc.) changes, therefore they are not cached. // Labels and icons can change on configuration (locale, etc.) changes, therefore they are not cached.
val cachedApps = cachedApps ?: pm.getInstalledPackages(PackageManager.GET_PERMISSIONS) val cachedApps = cachedApps ?: pm.getInstalledPackages(
PackageManager.GET_PERMISSIONS or PackageManager.MATCH_UNINSTALLED_PACKAGES)
.filter { .filter {
when (it.packageName) { when (it.packageName) {
app.packageName -> false app.packageName -> false
...@@ -265,6 +266,7 @@ class AppManager : AppCompatActivity() { ...@@ -265,6 +266,7 @@ class AppManager : AppCompatActivity() {
val proxiedAppString = DataStore.individual val proxiedAppString = DataStore.individual
profiles.forEach { profiles.forEach {
it.individual = proxiedAppString it.individual = proxiedAppString
it.bypass = DataStore.bypass
ProfileManager.updateProfile(it) ProfileManager.updateProfile(it)
} }
if (DataStore.directBootAware) DirectBoot.update() if (DataStore.directBootAware) DirectBoot.update()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment