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

Commit 72291506 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Omit the authority if moving returned cursor failed." into nyc-andromeda-dev

parents 0fa2a2cf 2b9578f9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class RecentsLoader extends AsyncTaskLoader<DirectoryResult> {
        // Collect all finished tasks
        boolean allDone = true;
        int totalQuerySize = 0;
        List<Cursor> cursors = new ArrayList<>();
        List<Cursor> cursors = new ArrayList<>(mTasks.size());
        for (RecentsTask task : mTasks.values()) {
            if (task.isDone()) {
                try {
@@ -168,6 +168,10 @@ public class RecentsLoader extends AsyncTaskLoader<DirectoryResult> {
                    throw new RuntimeException(e);
                } catch (ExecutionException e) {
                    // We already logged on other side
                } catch (Exception e) {
                    // Catch exceptions thrown when we read the cursor.
                    Log.e(TAG, "Failed to query Recents for authority: " + task.authority
                            + ". Skip this authority in Recents.", e);
                }
            } else {
                allDone = false;
@@ -189,7 +193,6 @@ public class RecentsLoader extends AsyncTaskLoader<DirectoryResult> {
            merged = new MatrixCursor(new String[0]);
        }


        final Cursor sorted = mState.sortModel.sortCursor(merged);

        // Tell the UI if this is an in-progress result. When loading is complete, another update is