Commit f331540e authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Only extract FAT UUID for primary physical.

We can now have primary emulated removeable storage, which causes
this code to be upset.

Bug: 19993667
Change-Id: Id806c5d41ede6e040af9a48496b9e103a9c75962
parent 8c744c41
......@@ -70,6 +70,7 @@ import android.os.RemoteException;
import android.os.SystemClock;
import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
import android.os.storage.VolumeInfo;
import android.preference.PreferenceManager;
import android.provider.BaseColumns;
import android.provider.MediaStore;
......@@ -5323,7 +5324,9 @@ public class MediaProvider extends ContentProvider {
helper = new DatabaseHelper(context, INTERNAL_DATABASE_NAME, true,
false, mObjectRemovedCallback);
} else if (EXTERNAL_VOLUME.equals(volume)) {
if (Environment.isExternalStorageRemovable()) {
// Only extract FAT volume ID for primary public
final VolumeInfo vol = mStorageManager.getPrimaryPhysicalVolume();
if (vol != null) {
final StorageVolume actualVolume = mStorageManager.getPrimaryVolume();
final int volumeId = actualVolume.getFatVolumeId();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment