Assert no-write access for Android/<data|obb> directories

'Android/<data|obb>' directories may not be executable, depending on the
mount/volume. However, these directories should never be writable, hence
we can always test no-write access for these directories.

Changed testAllWalkingUpTreeReadOnly to assertDirNoWriteAccess for
Android/<data|obb> path instead of assertDirReadOnlyAccess

Bug: 160211885
Test: atest ExternalStorageHostTest#testExternalStorageRead29
Merged-In: I6140f79f3cc5f23397607c6e220aee20894d7948
Change-Id: I6140f79f3cc5f23397607c6e220aee20894d7948
diff --git a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java
index 14df3cf..a43bbe7 100644
--- a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java
+++ b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java
@@ -60,6 +60,12 @@
                 path = path.getParentFile();
             }
 
+            // Path is 'Android/<data|obb>'. These directories may not be executable, depending on
+            // the mount. However, these directories should never be writable, hence we only test
+            // for no-write access here.
+            assertDirNoWriteAccess(path);
+            path = path.getParentFile();
+
             // Keep walking up until we leave device
             while (path != null) {
                 if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState(path))) {