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

Commit 1010b256 authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski
Browse files

DO NOT MERGE: 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
(cherry picked from commit 1c9e386f)
parent 54c992e7
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -212,10 +212,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;