Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b4851f5 authored by Michael W's avatar Michael W Committed by Nolen Johnson
Browse files

LineageParts: Remove unavailable entries from search

* By checking isAvailable() before adding an entry to the provider
  we can make sure removed preferences are not visible in search

Change-Id: I05465dbaed9055423a495ef91ce0e352ff8878ca
parent b76e5de8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class LineagePartsSearchIndexablesProvider extends SearchIndexablesProvid
        // from parts_catalog.xml for indexing
        for (String key : keys) {
            PartInfo i = PartsList.get(getContext()).getPartInfo(key);
            if (i == null || i.getXmlRes() <= 0) {
            if (i == null || i.getXmlRes() <= 0 || !i.isAvailable()) {
                continue;
            }

@@ -106,7 +106,7 @@ public class LineagePartsSearchIndexablesProvider extends SearchIndexablesProvid
        // which don't have an associated XML resource
        for (String key : keys) {
            PartInfo i = PartsList.get(getContext()).getPartInfo(key);
            if (i == null) {
            if (i == null || !i.isAvailable()) {
                continue;
            }

@@ -167,7 +167,7 @@ public class LineagePartsSearchIndexablesProvider extends SearchIndexablesProvid

        for (String key : keys) {
            PartInfo i = PartsList.get(getContext()).getPartInfo(key);
            if (i == null) {
            if (i == null || !i.isAvailable()) {
                continue;
            }