OSDN Git Service

MediaStore.Audio.Media.getContentUriForPath() returns unexpected content
authorJan Bjernler <jan2.bjernler@sonymobile.com>
Mon, 30 Apr 2012 07:16:52 +0000 (09:16 +0200)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Fri, 8 Feb 2013 16:17:23 +0000 (16:17 +0000)
commit66eb5899574cda2aae905248a58a2bd675247109
tree9a4cc086dede38b4f752708c3238ec3edb215fab
parent7c2920625eb72216025aeb8ea8dce544df0eca36
MediaStore.Audio.Media.getContentUriForPath() returns unexpected content

MediaStore.Audio.getContentUriForPath() returns an uri to
internal storage if anything but /mnt/sdcard/ is sent in.
This fix checks if there is an additional sdcard
(normally called ext_card) or usb mass storage attached to
the device and then returns an uri to the external db.
The extra sdcard name and the usb mass storage name info is read from
the system environment variable SECONDARY_STORAGE so if a customer
chooses to change the name this will work as expected.

Change-Id: Ib78bca929fe382d4770df895149a0132f0e56994
core/java/android/provider/MediaStore.java