OSDN Git Service

Don't double-count external cached app data.
authorJeff Sharkey <jsharkey@android.com>
Wed, 7 Jun 2017 21:59:03 +0000 (15:59 -0600)
committerJeff Sharkey <jsharkey@google.com>
Wed, 7 Jun 2017 22:21:53 +0000 (22:21 +0000)
Cached app data is already counted in extStats.dataSize, so we don't
need to count it twice.

Test: builds, boots, verified Settings UI before/after
Bug: 62343684
Change-Id: Ic02cbe3f5938949730f9bc8d911ed398436f84d7

cmds/installd/InstalldNativeService.cpp

index 3041467..60c89a9 100644 (file)
@@ -1698,7 +1698,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std:
                 collectQuotaStats(device, userId, appId, nullptr, &extStats);
             }
         }
-        appSize = extStats.dataSize + extStats.cacheSize;
+        appSize = extStats.dataSize;
         ATRACE_END();
     } else {
         ATRACE_BEGIN("manual");