Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix OldAndroidZipStressTest for user builds

The test was trying to create ZipFile instances with ODEX files and
failing so add a FileNameFilter that only returns APK files.

Bug 6721995

Change-Id: Ifadcb993d37f7f08e4864c5ce5e8dc4ed7d439fb
  • Loading branch information...
commit 5e60f2b0a2d9bb5a069fbe5e898fff8520936977 1 parent 1982194
authored June 24, 2012
7  luni/src/test/java/libcore/java/util/zip/OldAndroidZipStressTest.java
@@ -17,6 +17,7 @@
17 17
 package libcore.java.util.zip;
18 18
 
19 19
 import java.io.File;
  20
+import java.io.FilenameFilter;
20 21
 import java.io.InputStream;
21 22
 import java.security.cert.Certificate;
22 23
 import java.util.Arrays;
@@ -58,7 +59,11 @@ public void checkJarCertificates(File file) throws Exception {
58 59
     }
59 60
 
60 61
     private File[] getFiles() {
61  
-        File[] result = new File("/system/app").listFiles();
  62
+        File[] result = new File("/system/app").listFiles(new FilenameFilter() {
  63
+            public boolean accept(File dir, String name) {
  64
+                return name.endsWith(".apk");
  65
+            }
  66
+        });
62 67
         return result != null ? result : new File[0];
63 68
     }
64 69
 

0 notes on commit 5e60f2b

Please sign in to comment.
Something went wrong with that request. Please try again.