Fix Gmail unit test
Fix a NPE where, while running the unit tests, a download is not found Change-Id: I7c407112e5cfe7c39ceace25c48c6eba4f5dcfbe
This commit is contained in:
@@ -430,11 +430,10 @@ public final class Downloads {
|
||||
|
||||
ContentResolver cr = context.getContentResolver();
|
||||
|
||||
Cursor c = cr.query(
|
||||
downloadUri, DOWNLOADS_PROJECTION, null /* selection */, null /* selection args */,
|
||||
null /* sort order */);
|
||||
Cursor c = cr.query(downloadUri, DOWNLOADS_PROJECTION, null /* selection */,
|
||||
null /* selection args */, null /* sort order */);
|
||||
try {
|
||||
if (!c.moveToNext()) {
|
||||
if (c == null || !c.moveToNext()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user