If one looks at the source of the query()
method:
public Cursor query(Query query) {
Cursor underlyingCursor = query.runQuery(mResolver, UNDERLYING_COLUMNS, mBaseUri);
if (underlyingCursor == null) {
return null;
}
return new CursorTranslator(underlyingCursor, mBaseUri);
}
... this could be break down to the question whether it is safe to access cursors in the UI thread. See Mark Murphy's excellent answer to this. Extract:
So query the DownloadManager in a background thread.