Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}

IVold.MOUNT_FLAG_VISIBLE is split into MOUNT_FLAG_VISIBLE_FOR_READ and
MOUNT_FLAG_VISIBLE_FOR_WRITE.
Accordingly, VolumeBase::MountFlags::kVisible is split into
kVisibleForRead and kVisibleForWrite.

Bug: 206019156
Test: m
Change-Id: Ia55673400d9f713f221650e1335a46ba11f6f027
Merged-In: Ia55673400d9f713f221650e1335a46ba11f6f027
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index d299593..02025b7 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -1002,8 +1002,8 @@
             // The volume must be mounted
             return false;
         }
-        if ((vol.getMountFlags() & VolumeBase::MountFlags::kVisible) == 0) {
-            // and visible
+        if (!vol.isVisibleForWrite()) {
+            // App dirs should only be created for writable volumes.
             return false;
         }
         if (vol.getInternalPath().empty()) {
@@ -1077,8 +1077,8 @@
                 // The volume must be mounted
                 return false;
             }
-            if ((vol.getMountFlags() & VolumeBase::MountFlags::kVisible) == 0) {
-                // and visible
+            if (!vol.isVisibleForWrite()) {
+                // Obb volume should only be created for writable volumes.
                 return false;
             }
             if (vol.getInternalPath().empty()) {