diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java
index 49d5455..b32da9d 100644
--- a/src/com/android/settings/deviceinfo/StorageSettings.java
+++ b/src/com/android/settings/deviceinfo/StorageSettings.java
@@ -146,6 +146,7 @@
         switch (vol.getType()) {
             case VolumeInfo.TYPE_PRIVATE:
             case VolumeInfo.TYPE_PUBLIC:
+            case VolumeInfo.TYPE_STUB:
                 return true;
             default:
                 return false;
@@ -178,7 +179,8 @@
                 final int color = COLOR_PRIVATE[privateCount++ % COLOR_PRIVATE.length];
                 mInternalCategory.addPreference(
                         new StorageVolumePreference(context, vol, color, volumeTotalBytes));
-            } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
+            } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC
+                    || vol.getType() == VolumeInfo.TYPE_STUB) {
                 mExternalCategory.addPreference(
                         new StorageVolumePreference(context, vol, COLOR_PUBLIC, 0));
             }
@@ -306,6 +308,8 @@
 
             } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
                 return handlePublicVolumeClick(getContext(), vol);
+            } else if (vol.getType() == VolumeInfo.TYPE_STUB) {
+                return handleStubVolumeClick(getContext(), vol);
             }
 
         } else if (key.startsWith("disk:")) {
@@ -330,6 +334,16 @@
     }
 
     @VisibleForTesting
+    static boolean handleStubVolumeClick(Context context, VolumeInfo vol) {
+        final Intent intent = vol.buildBrowseIntent();
+        if (vol.isMountedReadable() && intent != null) {
+            context.startActivity(intent);
+            return true;
+        }
+        return false;
+    }
+
+    @VisibleForTesting
     static boolean handlePublicVolumeClick(Context context, VolumeInfo vol) {
         final Intent intent = vol.buildBrowseIntent();
         if (vol.isMountedReadable() && intent != null) {
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/StorageSettingsTest.java b/tests/robotests/src/com/android/settings/deviceinfo/StorageSettingsTest.java
index cb02c76..2598105 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/StorageSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/StorageSettingsTest.java
@@ -66,4 +66,16 @@
         verify(mActivity, never()).startActivity(null);
         verify(mActivity).startActivity(any(Intent.class));
     }
+
+    @Test
+    public void handleStubVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse() {
+        VolumeInfo volumeInfo = mock(VolumeInfo.class, RETURNS_DEEP_STUBS);
+        when(volumeInfo.isMountedReadable()).thenReturn(true);
+
+        StorageSettings.handleStubVolumeClick(mActivity, volumeInfo);
+
+        verify(mActivity, never()).startActivity(null);
+        verify(mActivity).startActivity(any(Intent.class));
+    }
+
 }
