Skip to content
Commit ba223760 authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Close suggestion cursors that arrive after adapter is closed

Before, after using the Browser, memory-hungry apps could
become very sluggish. This was because the search dialog in the
system process had the BrowserProvider open, which in turn had
EnhancedGoogleSearch open. Since EhancedGoogleSearch runs in acore,
the system would keep both the Browser process and acore to stay
around forever.

The cause (or at least one common cause) for this was that
if the user types quickly, and clicks on a suggestion before
the displayed suggestions have caught up, some suggestion cursors
are not be closed.

This change solves this problem by adding a close() method to
SuggestionsAdapter. SuggestionsAdapter now closes any cursors
that are passed to it after close() is called.

Fixes http://b/issue?id=2078226
"global search holding reference to browser: system -> browser -> acore = :("
parent b56de747
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment