From 9fa9fb6c111db353b355bcc6c30b457d6e4f7c07 Mon Sep 17 00:00:00 2001 From: Jorge Ruesga Date: Sun, 7 Sep 2014 02:04:16 +0200 Subject: contacts: return the first sdcard entry found Signed-off-by: Jorge Ruesga Conflicts: src/com/android/contacts/common/MoreContactUtils.java Change-Id: I513cfe6acb9a7ac85ddeba7f92b8efc5e19ed369 --- src/com/android/contacts/common/MoreContactUtils.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/android/contacts/common/MoreContactUtils.java b/src/com/android/contacts/common/MoreContactUtils.java index fcb13b21..87043ca0 100644 --- a/src/com/android/contacts/common/MoreContactUtils.java +++ b/src/com/android/contacts/common/MoreContactUtils.java @@ -334,18 +334,16 @@ public class MoreContactUtils { } public static String getSDPath(Context context) { - String sd = null; StorageManager mStorageManager = (StorageManager) context .getSystemService(Context.STORAGE_SERVICE); StorageVolume[] volumes = mStorageManager.getVolumeList(); for (int i = 0; i < volumes.length; i++) { if (volumes[i].isRemovable() && volumes[i].allowMassStorage() - && !volumes[i].isPrimary() && volumes[i].getDescription(context).contains("SD")) { - sd = volumes[i].getPath(); + return volumes[i].getPath(); } } - return sd; + return null; } public static boolean isAPMOnAndSIMPowerDown(Context context) { -- cgit v1.2.3