From a01369893823ee3d62ea79c422a76fe810f8a5cb Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 6 Jul 2017 11:29:37 -0600 Subject: [PATCH] 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 --- cmds/installd/InstalldNativeService.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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