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

Commit 7910925c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix atest ZipArchiveInputStream ClassNotFound"

parents f15dc577 c7fbae25
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -41,15 +41,13 @@ import com.android.documentsui.base.State;
import com.android.documentsui.files.FilesActivity;
import com.android.documentsui.services.TestNotificationService;

import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

/**
* This class test the below points
@@ -249,12 +247,12 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {

    private void loadImageFromResources(Uri root, DocumentsProviderHelper helper, int resId,
            Resources res) throws Exception {
        ZipArchiveInputStream in = null;
        ZipInputStream in = null;
        int read = 0;
        int count = 0;
        try {
            in = new ZipArchiveInputStream(res.openRawResource(resId));
            ArchiveEntry archiveEntry = null;
            in = new ZipInputStream(res.openRawResource(resId));
            ZipEntry archiveEntry = null;
            while ((archiveEntry = in.getNextEntry()) != null && (count++ < TARGET_COUNT)) {
                String fileName = archiveEntry.getName();
                Uri uri = helper.createDocument(root, "image/png", fileName);