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:
@@ -57,7 +57,7 @@ import java.util.List;
|
|||||||
public class Memory extends SettingsPreferenceFragment implements OnCancelListener,
|
public class Memory extends SettingsPreferenceFragment implements OnCancelListener,
|
||||||
MeasurementReceiver {
|
MeasurementReceiver {
|
||||||
private static final String TAG = "Memory";
|
private static final String TAG = "Memory";
|
||||||
private static final boolean localLOGV = false;
|
static final boolean localLOGV = false;
|
||||||
|
|
||||||
private static final String MEMORY_SD_SIZE = "memory_sd_size";
|
private static final String MEMORY_SD_SIZE = "memory_sd_size";
|
||||||
|
|
||||||
@@ -278,6 +278,12 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
|
|||||||
intent.setClass(getActivity(), com.android.settings.MediaFormat.class);
|
intent.setClass(getActivity(), com.android.settings.MediaFormat.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
|
} else if (preference == mInternalAppsUsage) {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_MANAGE_PACKAGE_STORAGE);
|
||||||
|
intent.setClass(getActivity(),
|
||||||
|
com.android.settings.Settings.ManageApplicationsActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -307,7 +307,9 @@ public class MemoryMeasurement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (succeeded) {
|
if (succeeded) {
|
||||||
mAppsSizeForThisStatsObserver += stats.codeSize + stats.dataSize;
|
mAppsSizeForThisStatsObserver += stats.codeSize + stats.dataSize +
|
||||||
|
stats.externalCacheSize + stats.externalDataSize +
|
||||||
|
stats.externalMediaSize + stats.externalObbSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mAppsList) {
|
synchronized (mAppsList) {
|
||||||
@@ -363,8 +365,8 @@ public class MemoryMeasurement {
|
|||||||
|
|
||||||
long mediaSize;
|
long mediaSize;
|
||||||
try {
|
try {
|
||||||
// TODO get these directories from somewhere
|
mediaSize = imcs.calculateDirectorySize(
|
||||||
mediaSize = imcs.calculateDirectorySize("/data/media");
|
Environment.getExternalStorageDirectory().getAbsolutePath());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i(TAG, "Could not read memory from default container service");
|
Log.i(TAG, "Could not read memory from default container service");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user