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

Commit 0b314e20 authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski
Browse files

Check if cursor returns a row for archives. (Follow up)

Test: All tests pass.
Bug: 31783726
Change-Id: Id2153763339993441986f38f6a5120db3f964960
parent 99fb548d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -153,11 +153,10 @@ public class ArchivesProvider extends DocumentsProvider implements Closeable {
                    archiveId.mArchiveUri,
                    new String[] { Document.COLUMN_DISPLAY_NAME },
                    null, null, null, null)) {
                if (archiveCursor == null) {
                if (archiveCursor == null || !archiveCursor.moveToFirst()) {
                    throw new FileNotFoundException(
                            "Cannot resolve display name of the archive.");
                }
                archiveCursor.moveToFirst();
                final String displayName = archiveCursor.getString(
                        archiveCursor.getColumnIndex(Document.COLUMN_DISPLAY_NAME));