Iteration on multi-user Storage UI.

Now that DefaultContainerService has visibility of external storage
for all users, we can measure internal storage in a single pass.
Internal storage measurement now iterates across all known users,
counting both apps and emulated storage usage.

Create MeasurementDetails object with documentation about what is
counted under various device configurations.  Generalize to measure
each Environment.DIRECTORY separately, so it can be combined as
needed.  General cleanup of how measurements are passed to UI.

Bug: 7003520
Change-Id: Ib89c185296a0c9debdc20beeaa98584d803a84e8
This commit is contained in:
Jeff Sharkey
2012-09-12 18:41:25 -07:00
parent fc76a78c45
commit da13ec0cb4
7 changed files with 433 additions and 598 deletions

View File

@@ -20,7 +20,6 @@ import android.app.Activity;
import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.storage.StorageVolume;
import android.text.format.Formatter;
import android.util.Log;
@@ -195,7 +194,7 @@ public class MiscFilesHandler extends ListActivity {
final StorageVolume storageVolume = activity.getIntent().getParcelableExtra(
StorageVolume.EXTRA_STORAGE_VOLUME);
StorageMeasurement mMeasurement = StorageMeasurement.getInstance(
activity, storageVolume, UserHandle.CURRENT);
activity, storageVolume);
if (mMeasurement == null) return;
mData = (ArrayList<StorageMeasurement.FileInfo>) mMeasurement.mFileInfoForMisc;
if (mData != null) {