[app] Fix app filter (#657)

This commit is contained in:
tehcneko 2021-05-22 21:43:36 +08:00 committed by GitHub
parent 7f83efb2d5
commit 33cf2b994c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -501,8 +501,7 @@ public class ScopeAdapter extends RecyclerView.Adapter<ScopeAdapter.ViewHolder>
for (PackageInfo info : appList) {
int userId = info.applicationInfo.uid / 100000;
String packageName = info.packageName;
if (userId != module.userId ||
packageName.equals("android") && userId != 0 ||
if (packageName.equals("android") && userId != 0 ||
packageName.equals(module.packageName) ||
packageName.equals(BuildConfig.APPLICATION_ID)) {
continue;
@ -512,6 +511,10 @@ public class ScopeAdapter extends RecyclerView.Adapter<ScopeAdapter.ViewHolder>
installedList.add(application);
if (userId != module.userId) {
continue;
}
if (scopeList != null && scopeList.contains(packageName)) {
recommendedList.add(application);
if (emptyCheckedList) {