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

Commit 1c9e386f authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski
Browse files

Temporarily disable the non-snapshot path for archives.

Unfortunately it doesn't work across processes (it was passing tests as
both tests and DocumentsUI were in the same process).

Bug: 32228589
Test: Current tests pass.
Change-Id: I9023802edbfe0945287c15911b94317f4543b859
parent 5d8ea8df
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -193,10 +193,12 @@ public class Archive implements Closeable {
            Context context, ParcelFileDescriptor descriptor, Uri archiveUri,
            @Nullable Uri notificationUri)
            throws IOException {
        if (canSeek(descriptor)) {
            return new Archive(context, new File(PROC_FD_PATH + descriptor.getFd()),
                    archiveUri, notificationUri);
        }
        // TODO: Temporarily disable non-snapshot code path, as /proc/self/fd/* files
        // are not openable across processes. b/32228589
        // if (canSeek(descriptor)) {
        //     return new Archive(context, new File(PROC_FD_PATH + descriptor.getFd()),
        //             archiveUri, notificationUri);
        // }

        // Fallback for non-seekable file descriptors.
        File snapshotFile = null;