From 1db848885d875fdc2852aad142f5134014aeb386 Mon Sep 17 00:00:00 2001 From: Daniel Nishi Date: Wed, 25 Jan 2017 11:47:28 -0800 Subject: [PATCH] Go to the old storage settings when using non-internal storage. There are a few things which, currently, can only be done on the old storage view. We can continue to use the storage dashboard fragment for the internal storage, but for SD cards and USB drives it makes sense to show the old view. Bug: 34623728 Test: Manual Change-Id: Ibe640decea6486a75034184c8f9f95bf00411553 --- .../settings/deviceinfo/StorageSettings.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java index 53d4c85b6ac..b79560ab975 100644 --- a/src/com/android/settings/deviceinfo/StorageSettings.java +++ b/src/com/android/settings/deviceinfo/StorageSettings.java @@ -279,8 +279,19 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index if (vol.getType() == VolumeInfo.TYPE_PRIVATE) { final Bundle args = new Bundle(); args.putString(VolumeInfo.EXTRA_VOLUME_ID, vol.getId()); - startFragment(this, StorageDashboardFragment.class.getCanonicalName(), - -1, 0, args); + + if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.getId())) { + startFragment(this, StorageDashboardFragment.class.getCanonicalName(), + -1, 0, args); + } else { + // TODO: Go to the StorageDashboardFragment once it fully handles all of the + // SD card cases and other private internal storage cases. + PrivateVolumeSettings.setVolumeSize(args, PrivateStorageInfo.getTotalSize(vol, + sTotalInternalStorage)); + startFragment(this, PrivateVolumeSettings.class.getCanonicalName(), + -1, 0, args); + } + return true; } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {