vold2: Enable support for custom mount perm masks and wire to asec

Signed-off-by: San Mehat <san@google.com>
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index f4b62c4..830c634 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -226,7 +226,8 @@
         return -1;
     }
 
-    if (Fat::doMount(loopDevice, mountPoint, false, false)) {
+    if (Fat::doMount(loopDevice, mountPoint, false, false, ownerUid,
+                     0, 0007, false)) {
         LOGE("ASEC FAT mount failed (%s)", strerror(errno));
         Loop::destroyByDevice(loopDevice);
         unlink(asecFileName);
@@ -250,7 +251,8 @@
     }
 
     snprintf(mountPoint, sizeof(mountPoint), "/asec/%s", id);
-    if (Fat::doMount(loopDevice, mountPoint, true, true)) {
+    // XXX:
+    if (Fat::doMount(loopDevice, mountPoint, true, true, 0, 0, 0227, false)) {
         LOGE("ASEC finalize mount failed (%s)", strerror(errno));
         return -1;
     }
@@ -331,7 +333,8 @@
         return -1;
     }
 
-    if (Fat::doMount(loopDevice, mountPoint, true, false)) {
+    if (Fat::doMount(loopDevice, mountPoint, true, false, ownerUid, 0,
+                     0227, false)) {
         LOGE("ASEC mount failed (%s)", strerror(errno));
         return -1;
     }