summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2017-01-26 17:48:38 +0000
committer android-build-merger <android-build-merger@google.com> 2017-01-26 17:48:38 +0000
commit1b705dc20b346ccda5f5ce02287c28aaa50491e2 (patch)
treee75af3536a4bf5400d726bd30de3ed9d4a1da295
parent63f928567d1dddbadfe113bde8f167b1d16df7d2 (diff)
parent8f1b3ed54f5dfeb7626df4203ee6ed0c3973a1ec (diff)
Merge "Fix two bugs in external storage accounting." am: d1361ceb0c am: e4dc5d4ec5 am: 0f08cf28bd
am: 8f1b3ed54f Change-Id: I3324121cd4f987c58cd0065200d21fbdfc98065b
-rw-r--r--cmds/installd/InstalldNativeService.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 86d1ab08d1..393ce74c22 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -1189,6 +1189,7 @@ static void collectManualExternalStatsForUser(const std::string& path, struct st
return;
}
while ((p = fts_read(fts)) != NULL) {
+ p->fts_number = p->fts_parent->fts_number;
switch (p->fts_info) {
case FTS_D:
if (p->fts_level == 4
@@ -1197,7 +1198,6 @@ static void collectManualExternalStatsForUser(const std::string& path, struct st
&& !strcmp(p->fts_parent->fts_parent->fts_parent->fts_name, "Android")) {
p->fts_number = 1;
}
- p->fts_number = p->fts_parent->fts_number;
// Fall through to count the directory
case FTS_DEFAULT:
case FTS_F:
@@ -1301,9 +1301,9 @@ binder::Status InstalldNativeService::getAppSize(const std::unique_ptr<std::stri
ATRACE_END();
ATRACE_BEGIN("external");
- auto extPath = create_data_media_package_path(uuid_, userId, pkgname, "data");
+ auto extPath = create_data_media_package_path(uuid_, userId, "data", pkgname);
collectManualStats(extPath, &extStats);
- auto mediaPath = create_data_media_package_path(uuid_, userId, pkgname, "media");
+ auto mediaPath = create_data_media_package_path(uuid_, userId, "media", pkgname);
calculate_tree_size(mediaPath, &extStats.dataSize);
ATRACE_END();
}