am cfe26919: am 533b7b53: am 90599cdf: Merge "Used space visible in SD Card bar graph" into honeycomb-mr2
* commit 'cfe26919abcd3c466f40b437d084311bf025d449': Used space visible in SD Card bar graph
This commit is contained in:
@@ -525,4 +525,11 @@ public class StorageMeasurement {
|
|||||||
return mFileName + " : " + mSize + ", id:" + mId;
|
return mFileName + " : " + mSize + ", id:" + mId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO remove this method, only used because external SD Card needs a special treatment.
|
||||||
|
*/
|
||||||
|
boolean isPrimary() {
|
||||||
|
return mIsPrimary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,6 +289,12 @@ public class StorageVolumePreferenceCategory extends PreferenceCategory implemen
|
|||||||
|
|
||||||
mPreferences[TOTAL_SIZE].setSummary(formatSize(totalSize));
|
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);
|
updatePreference(appsSize, totalSize, APPLICATIONS);
|
||||||
|
|
||||||
long totalMediaSize = 0;
|
long totalMediaSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user