Loading src/com/android/settings/deviceinfo/StorageMeasurement.java +8 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,7 @@ public class StorageMeasurement { File top = new File(mStorageVolume.getPath()); mFileInfoForMisc = new ArrayList<FileInfo>(); File[] files = top.listFiles(); if (files == null) return; final int len = files.length; // Get sizes of all top level nodes except the ones already computed... long counter = 0; Loading Loading @@ -524,4 +525,11 @@ public class StorageMeasurement { return mFileName + " : " + mSize + ", id:" + mId; } } /** * TODO remove this method, only used because external SD Card needs a special treatment. */ boolean isPrimary() { return mIsPrimary; } } src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java +6 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,12 @@ public class StorageVolumePreferenceCategory extends PreferenceCategory implemen mPreferences[TOTAL_SIZE].setSummary(formatSize(totalSize)); if (!mMeasurement.isPrimary()) { // TODO FIXME: external SD card will not report any size. Show used space in bar graph final long usedSize = totalSize - availSize; mUsageBarPreference.addEntry(usedSize / (float) totalSize, android.graphics.Color.GRAY); } updatePreference(appsSize, totalSize, APPLICATIONS); long totalMediaSize = 0; Loading Loading
src/com/android/settings/deviceinfo/StorageMeasurement.java +8 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,7 @@ public class StorageMeasurement { File top = new File(mStorageVolume.getPath()); mFileInfoForMisc = new ArrayList<FileInfo>(); File[] files = top.listFiles(); if (files == null) return; final int len = files.length; // Get sizes of all top level nodes except the ones already computed... long counter = 0; Loading Loading @@ -524,4 +525,11 @@ public class StorageMeasurement { return mFileName + " : " + mSize + ", id:" + mId; } } /** * TODO remove this method, only used because external SD Card needs a special treatment. */ boolean isPrimary() { return mIsPrimary; } }
src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java +6 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,12 @@ public class StorageVolumePreferenceCategory extends PreferenceCategory implemen mPreferences[TOTAL_SIZE].setSummary(formatSize(totalSize)); if (!mMeasurement.isPrimary()) { // TODO FIXME: external SD card will not report any size. Show used space in bar graph final long usedSize = totalSize - availSize; mUsageBarPreference.addEntry(usedSize / (float) totalSize, android.graphics.Color.GRAY); } updatePreference(appsSize, totalSize, APPLICATIONS); long totalMediaSize = 0; Loading