Created
December 7, 2016 17:18
-
-
Save invisiblek/612972473340b45ed6dc2969529eea13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java | |
index 18959c7..1eb409b 100644 | |
--- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java | |
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java | |
@@ -160,8 +160,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment { | |
mVolume = mStorageManager.findVolumeById(mVolumeId); | |
final long sharedDataSize = mVolume.getPath().getTotalSpace(); | |
- boolean isInternal = VolumeInfo.ID_PRIVATE_INTERNAL.equals(mVolume.getId()); | |
- mTotalSize = isInternal ? getArguments().getLong(EXTRA_VOLUME_SIZE, 0) : sharedDataSize; | |
+ mTotalSize = getArguments().getLong(EXTRA_VOLUME_SIZE, 0); | |
mSystemSize = mTotalSize - sharedDataSize; | |
if (LOGV) Log.v(TAG, | |
"onCreate() mTotalSize: " + mTotalSize + " sharedDataSize: " + sharedDataSize); | |
diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java | |
index c355b82..7757efc 100644 | |
--- a/src/com/android/settings/deviceinfo/StorageSettings.java | |
+++ b/src/com/android/settings/deviceinfo/StorageSettings.java | |
@@ -169,10 +169,8 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index | |
if (vol.getType() == VolumeInfo.TYPE_PRIVATE) { | |
final long volumeTotalBytes = getTotalSize(vol); | |
final int color = COLOR_PRIVATE[privateCount++ % COLOR_PRIVATE.length]; | |
- boolean isInternal = VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.getId()); | |
- long size = isInternal ? volumeTotalBytes : vol.getPath().getTotalSpace(); | |
mInternalCategory.addPreference( | |
- new StorageVolumePreference(context, vol, color, size)); | |
+ new StorageVolumePreference(context, vol, color, volumeTotalBytes)); | |
if (vol.isMountedReadable()) { | |
final File path = vol.getPath(); | |
privateUsedBytes += (volumeTotalBytes - path.getFreeSpace()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment