Use existing respond hack to close GlobalSearch cursor
Before, when using Quick Search Box, this showed up in the log:
W/SuggestionCursor( 1013): received unexpectd respond: no DialogCursorProtocol.METHOD specified.
And a while later, this:
W/SuggestionCursor( 1013): SuggestionCursor finalized without being closed. Someone is leaking.
This latter warning is because of http://b/issue?id=2015069, where cross-process Cursor.close()
doesn't actually close the target cursor. The first warning is because
GlobalSearch.SuggestionCursor does not handle EXTRA_CURSOR_RESPOND_CLOSE_CURSOR
as sent by SuggestionsAdapter, which is a work-around for http://b/issue?id=2015069.
This change modified GlobalSearch.SuggestionCursor to close itself when
it receives EXTRA_CURSOR_RESPOND_CLOSE_CURSOR.
This will reduce some memory and thread life drag in GlobalSearch.
1 file changed