diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2014-09-07 02:04:16 +0200 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2014-12-08 05:40:27 +0000 |
commit | 9fa9fb6c111db353b355bcc6c30b457d6e4f7c07 (patch) | |
tree | 7cc818bc476d0ada2415e56422dd8d45f7becff7 | |
parent | 7189fda4cbcd162555d59ee335709173ee46bbea (diff) | |
download | android_packages_apps_ContactsCommon-9fa9fb6c111db353b355bcc6c30b457d6e4f7c07.tar.gz android_packages_apps_ContactsCommon-9fa9fb6c111db353b355bcc6c30b457d6e4f7c07.tar.bz2 android_packages_apps_ContactsCommon-9fa9fb6c111db353b355bcc6c30b457d6e4f7c07.zip |
contacts: return the first sdcard entry found
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Conflicts:
src/com/android/contacts/common/MoreContactUtils.java
Change-Id: I513cfe6acb9a7ac85ddeba7f92b8efc5e19ed369
-rw-r--r-- | src/com/android/contacts/common/MoreContactUtils.java | 6 |
1 files 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) { |