bug:3308791 appusage should include space used on /sdcard

when "application usage" is clicked on, drop the screen into
Settings --> Applications --> Manage Applications
(all tab, sorted by size)
Change-Id: I64e11ae9a92529b5fb2781941e532951ad3d04c1
This commit is contained in:
Vasu Nori
2011-01-17 13:50:18 -08:00
parent 18d6fe1a3d
commit fdf7220a03
2 changed files with 12 additions and 4 deletions

View File

@@ -307,7 +307,9 @@ public class MemoryMeasurement {
return;
}
if (succeeded) {
mAppsSizeForThisStatsObserver += stats.codeSize + stats.dataSize;
mAppsSizeForThisStatsObserver += stats.codeSize + stats.dataSize +
stats.externalCacheSize + stats.externalDataSize +
stats.externalMediaSize + stats.externalObbSize;
}
synchronized (mAppsList) {
@@ -363,8 +365,8 @@ public class MemoryMeasurement {
long mediaSize;
try {
// TODO get these directories from somewhere
mediaSize = imcs.calculateDirectorySize("/data/media");
mediaSize = imcs.calculateDirectorySize(
Environment.getExternalStorageDirectory().getAbsolutePath());
} catch (Exception e) {
Log.i(TAG, "Could not read memory from default container service");
return;