Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 123a0e71 authored by Felipe Leme's avatar Felipe Leme
Browse files

Check for valid paths when getVolumeList() returns invisible volumes.

The FLAG_INCLUDE_INVISIBLE was created to let SM.getStorageVolumes()
return mounted volumes (like USB drives), but in the current form it
might return invalid volumes. For example, when a SD Card is adopted as
an internal storage, it will return 2 volumes instead of one, the "bad"
one being:

VolumeInfo{emulated}:
     type=EMULATED diskId=null partGuid=null mountFlags=0 mountUserId=-1
     state=UNMOUNTED
     fsType=null fsUuid=null fsLabel=null
     path=null internalPath=null

As such, we need to filter out those volumes that don't have a path.

BUG: 29250241
Change-Id: I3f84b53eac98f31f918d843c70f9d42983e2a438
parent 9b5a7807
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment