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

Commit 1b28a0a7 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

Update explanation in comments.

Change-Id: I2c1ee846a12492d86d779310eacb239618a59b70
parent 23bc9b72
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -320,9 +320,15 @@ public class ViewContactActivity extends Activity
            return;
        }

        // We also have to iterate over the Cursor in the background,
        // as iterating over the Cursor can ANR on large result sets,
        // especially as our ContentProvider is cross-process.
        // One would think we could just iterate over the Cursor
        // directly here, as the result set should be small, and we've
        // already run the query in an AsyncTask, but a lot of ANRs
        // were being reported in this code nonetheless.  See bug
        // 2539603 for details.  The real bug which makes this result
        // set huge and CPU-heavy may be elsewhere.
        // TODO: if we keep this async, perhaps the entity iteration
        // should also be original AsyncTask, rather than ping-ponging
        // between threads like this.
        final ArrayList<Entity> oldEntities = mEntities;
        (new AsyncTask<Void, Void, ArrayList<Entity>>() {
            @Override