[app] Reverse logic for filter option (#515)

This commit is contained in:
Wang Han 2021-04-26 16:00:28 +08:00 committed by GitHub
parent 6f1ad1443e
commit ee49c01ccf
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)) {
return false;
}
if (!preferences.getBoolean("filter_modules", true)) {
if (preferences.getBoolean("filter_modules", true)) {
if (info.applicationInfo.metaData != null && info.applicationInfo.metaData.containsKey("xposedmodule")) {
return true;
}
}
if (!preferences.getBoolean("filter_games", true)) {
if (preferences.getBoolean("filter_games", true)) {
if (info.applicationInfo.category == ApplicationInfo.CATEGORY_GAME) {
return true;
}
@ -207,7 +207,7 @@ public class ScopeAdapter extends RecyclerView.Adapter<ScopeAdapter.ViewHolder>
if ((info.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) == 0) {
return true;
}
return !preferences.getBoolean("filter_system_apps", true) && (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) {