Merge "Revert "Revert "Revert "Set a default ACL on /data/media/userId."""" am: a98846d8d5 am: 375884bd0a am: e5d8fe2474

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1592902

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia0b6cab9e43d08c5d5e1f6f37a9ce3f7fee35e0e
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 4f62642..49b2d60 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,9 +1,15 @@
 {
   "presubmit": [
     {
+      "name": "CtsScopedStorageCoreHostTest"
+    },
+    {
       "name": "CtsScopedStorageHostTest"
     },
     {
+      "name": "CtsScopedStorageDeviceOnlyTest"
+    },
+    {
       "name": "AdoptableHostTest"
     }
   ]
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index b7f1749..ef5dfce 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -944,6 +944,9 @@
     _aidl_return->cmd.reset(unique_fd(fds[CMD].release()));
     _aidl_return->pendingReads.reset(unique_fd(fds[PENDING_READS].release()));
     _aidl_return->log.reset(unique_fd(fds[LOGS].release()));
+    if (fds[BLOCKS_WRITTEN].ok()) {
+        _aidl_return->blocksWritten.emplace(unique_fd(fds[BLOCKS_WRITTEN].release()));
+    }
     return Ok();
 }
 
@@ -960,7 +963,8 @@
     ENFORCE_SYSTEM_OR_ROOT;
 
     auto incfsControl =
-            incfs::createControl(control.cmd.get(), control.pendingReads.get(), control.log.get());
+            incfs::createControl(control.cmd.get(), control.pendingReads.get(), control.log.get(),
+                                 control.blocksWritten ? control.blocksWritten->get() : -1);
     auto cleanupFunc = [](auto incfsControl) {
         for (auto& fd : incfsControl->releaseFds()) {
             (void)fd.release();