Settings: fix storage measurement for device without emulated sdcard
StorageMeasurement: misc files should only be measured for internal
storage only if it is the emulated storage, otherwise misc count
for the primary storage will be erroneously duplicated on the
internal storage count.
StorageVolumePreferenceCategory:
- Always create mMountTogglePreference to avoid null pointer
exception for code that relies on it existing
- Check if the keys exist before calculating totalValues to
avoid null pointer exception on storage where media is not
calculated
- For available/readonly, set title, not summary (summary is
supposed to be the amount available)
Change-Id: Ib217f79ee562dffc514696fff038e58ed0dba7d9
This commit is contained in:
@@ -422,7 +422,7 @@ public class StorageMeasurement {
|
||||
}
|
||||
|
||||
// Measure misc files not counted under media
|
||||
if (mIsInternal || mIsPrimary) {
|
||||
if (measureMedia) {
|
||||
final File path = mIsInternal ? currentEnv.getExternalStorageDirectory()
|
||||
: mVolume.getPathFile();
|
||||
details.miscSize = measureMisc(imcs, path);
|
||||
|
||||
Reference in New Issue
Block a user