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

Commit 92fa371a authored by Juan Flores's avatar Juan Flores Committed by Yoshinori Hirano
Browse files

Fix crash while searching in Settings

A crash occurrs when power button is pressed during search in Settings
due to IndexOutOfBoundsException in HeaderViewListAdapter.
When suggestions and results are cleared,
the layouts should be invisible to solve this problem.

Bug: 27913974
Test: manual - search "font" and press power button twice

Change-Id: Ia53d393e695dbb238fc4c82a3fe52ef4250d84c1
parent 363c529d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ public class SearchResultsSummary extends InstrumentedFragment {
            mUpdateSuggestionsTask = null;
        }
        setSuggestionsCursor(null);
        setSuggestionsVisibility(false);
    }

    private void setSuggestionsCursor(Cursor cursor) {
@@ -341,6 +342,7 @@ public class SearchResultsSummary extends InstrumentedFragment {
            mUpdateSearchResultsTask = null;
        }
        setResultsCursor(null);
        setResultsVisibility(false);
    }

    private void setResultsCursor(Cursor cursor) {