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
This commit is contained in:
committed by
Yoshinori Hirano
parent
363c529dc6
commit
92fa371a0b
@@ -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) {
|
||||
|
Reference in New Issue
Block a user