DO NOT MERGE Fix testVerifyStatsExternalConsistent case am: ffc805e106 am: 61c1261dfc am: 8ab5cb3179 am: f32476351a

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1196065

Change-Id: I519e50935d2fae1a6483881b78f4cbb1a21e7618
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 0782b43..ae77a99 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -2195,6 +2195,9 @@
         auto obbPath = StringPrintf("%s/Android/obb",
                 create_data_media_path(uuid_, userId).c_str());
         calculate_tree_size(obbPath, &obbSize);
+        if (!(flags & FLAG_USE_QUOTA)) {
+            totalSize -= obbSize;
+        }
         ATRACE_END();
     }