Fix directory recursion in FileSystemPermissionTest
FileSystemPermissionTest.testAllBlockDevicesAreSecure() was missing
the check for symbolic links, so add it.
Change-Id: I821e6806e2ae8f7a4b472ab2f2d4d1e17616f188
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 92f3e53..ec4fe3f 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -665,6 +665,12 @@
getAllInsecureBlockDevicesInDirAndSubdir(File dir) throws Exception {
assertTrue(dir.isDirectory());
Set<File> retval = new HashSet<File>();
+
+ if (isSymbolicLink(dir)) {
+ // don't examine symbolic links.
+ return retval;
+ }
+
File[] subDirectories = dir.listFiles(new FileFilter() {
@Override public boolean accept(File pathname) {
return pathname.isDirectory();