diff options
author | 2019-03-23 03:48:27 +0000 | |
---|---|---|
committer | 2019-03-23 03:48:27 +0000 | |
commit | b6c5df1abefa76bfa2f554143c41d7ab6519b765 (patch) | |
tree | 08b29d9c27ee981c29330f0f6145800e9c32b7fc | |
parent | d2ecb31e94498c59d0b7e3856a2fab265e0d9d41 (diff) | |
parent | 6d775c584de1c26e6442653b6f5e2af7c694191d (diff) |
Merge "Shift to measure per-userId OBB directories."
-rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 6 | ||||
-rw-r--r-- | cmds/installd/utils.cpp | 4 | ||||
-rw-r--r-- | cmds/installd/utils.h | 1 |
3 files changed, 4 insertions, 7 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index 2efcf11ef9..92fac66d67 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -1648,7 +1648,8 @@ binder::Status InstalldNativeService::getAppSize(const std::unique_ptr<std::stri ATRACE_BEGIN("obb"); for (const auto& packageName : packageNames) { - auto obbCodePath = create_data_media_obb_path(uuid_, packageName.c_str()); + auto obbCodePath = create_data_media_package_path(uuid_, userId, + "obb", packageName.c_str()); calculate_tree_size(obbCodePath, &extStats.codeSize); } ATRACE_END(); @@ -1982,7 +1983,8 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: ATRACE_END(); ATRACE_BEGIN("obb"); - auto obbPath = create_data_media_obb_path(uuid_, ""); + auto obbPath = StringPrintf("%s/Android/obb", + create_data_media_path(uuid_, userId).c_str()); calculate_tree_size(obbPath, &obbSize); ATRACE_END(); } diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp index da097db06b..4eb1df0b2e 100644 --- a/cmds/installd/utils.cpp +++ b/cmds/installd/utils.cpp @@ -244,10 +244,6 @@ std::string create_data_media_path(const char* volume_uuid, userid_t userid) { return StringPrintf("%s/media/%u", create_data_path(volume_uuid).c_str(), userid); } -std::string create_data_media_obb_path(const char* volume_uuid, const char* package_name) { - return StringPrintf("%s/media/obb/%s", create_data_path(volume_uuid).c_str(), package_name); -} - std::string create_data_media_package_path(const char* volume_uuid, userid_t userid, const char* data_type, const char* package_name) { return StringPrintf("%s/Android/%s/%s", create_data_media_path(volume_uuid, userid).c_str(), diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h index 955d524069..6a420261a1 100644 --- a/cmds/installd/utils.h +++ b/cmds/installd/utils.h @@ -75,7 +75,6 @@ std::string create_data_misc_de_rollback_package_path(const char* volume_uuid, userid_t user, int32_t snapshot_id, const char* package_name); std::string create_data_media_path(const char* volume_uuid, userid_t userid); -std::string create_data_media_obb_path(const char* volume_uuid, const char* package_name); std::string create_data_media_package_path(const char* volume_uuid, userid_t userid, const char* data_type, const char* package_name); |