Give secondary users read-only physical cards.
Jeff Sharkey [Tue, 28 Jul 2015 21:31:33 +0000 (14:31 -0700)]
Follow method refactoring so we only consider writable locations.

Bug: 22787184
Change-Id: Ib8b037216d23ab474d7e0df427671d174eaf030a

src/com/android/providers/downloads/Helpers.java

index 098d11b..d1cc545 100644 (file)
@@ -390,7 +390,8 @@ public class Helpers {
                 }
             }
 
-            final StorageVolume[] volumes = StorageManager.getVolumeList(UserHandle.myUserId());
+            final StorageVolume[] volumes = StorageManager.getVolumeList(UserHandle.myUserId(),
+                    StorageManager.FLAG_FOR_WRITE);
             for (StorageVolume volume : volumes) {
                 if (containsCanonical(volume.getPathFile(), file)) {
                     return true;