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

Commit 655236cb authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Android (Google) Code Review
Browse files

Merge "Update explanation in comments."

parents 7c8561d1 1b28a0a7
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