[app] Update shouldHideApp() check for new preference (#513)

This commit is contained in:
Wang Han 2021-04-26 14:59:35 +08:00 committed by GitHub
parent ef77f20dda
commit 6f1ad1443e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -190,12 +190,12 @@ public class ScopeAdapter extends RecyclerView.Adapter<ScopeAdapter.ViewHolder>
if (checkedList.contains(app)) { if (checkedList.contains(app)) {
return false; return false;
} }
if (!preferences.getBoolean("show_modules", false)) { if (!preferences.getBoolean("filter_modules", true)) {
if (info.applicationInfo.metaData != null && info.applicationInfo.metaData.containsKey("xposedmodule")) { if (info.applicationInfo.metaData != null && info.applicationInfo.metaData.containsKey("xposedmodule")) {
return true; return true;
} }
} }
if (!preferences.getBoolean("show_games", false)) { if (!preferences.getBoolean("filter_games", true)) {
if (info.applicationInfo.category == ApplicationInfo.CATEGORY_GAME) { if (info.applicationInfo.category == ApplicationInfo.CATEGORY_GAME) {
return true; return true;
} }
@ -207,7 +207,7 @@ public class ScopeAdapter extends RecyclerView.Adapter<ScopeAdapter.ViewHolder>
if ((info.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) == 0) { if ((info.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) == 0) {
return true; return true;
} }
return !preferences.getBoolean("show_system_apps", false) && (info.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; return !preferences.getBoolean("filter_system_apps", true) && (info.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
} }
private List<AppInfo> sortApps(List<AppInfo> list) { private List<AppInfo> sortApps(List<AppInfo> list) {