diff --git a/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java index 3aaadecf5..7e0354928 100644 --- a/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java @@ -129,30 +129,23 @@ public class ApplicationAdapter extends RecyclerView.Adapter filteredApps; if (constraint == null || constraint.length() == 0) { - filteredApps = mOriginalList; + mList = mOriginalList; } else { - filteredApps = new ArrayList<>(); + mList = new ArrayList<>(); String filter = constraint.toString().toLowerCase(); for (ApplicationInfo info : mOriginalList) { if (Utils.lowercaseContains(info.loadLabel(pm), filter) || Utils.lowercaseContains(info.packageName, filter)) { - filteredApps.add(info); + mList.add(info); } } } - - FilterResults results = new FilterResults(); - results.values = filteredApps; - results.count = filteredApps.size(); - return results; + return null; } - @SuppressWarnings("unchecked") @Override protected void publishResults(CharSequence constraint, FilterResults results) { - mList = (List) results.values; notifyDataSetChanged(); } }