From: Jeff Sharkey Date: Thu, 6 Jul 2017 17:29:37 +0000 (-0600) Subject: Change storage migration to use quota APIs. X-Git-Tag: android-x86-9.0-r1~298^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a01369893823ee3d62ea79c422a76fe810f8a5cb;p=android-x86%2Fframeworks-native.git Change storage migration to use quota APIs. New quota APIs are much faster than trying to measure manually, and removing this last user of calculateDirectorySize() means we can remove it once and for all. Bug: 36056324 Test: builds, boots Change-Id: I60bb197ffc161ed24fe4aa8093495c8874095cdb --- diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index e3021d8905..423cfde5ed 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -1641,6 +1641,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr(&dq)) == 0) { +#if MEASURE_DEBUG + LOG(DEBUG) << "quotactl() for GID " << AID_MEDIA_OBB << " " << dq.dqb_curspace; +#endif + obbSize = dq.dqb_curspace; + } ATRACE_END(); ATRACE_BEGIN("apps"); @@ -1744,6 +1752,11 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr ret; @@ -1752,6 +1765,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr