@NonNull
    private static Map<String, String> getVolumeMap() {
        final Map<String, String> volumeMap = new HashMap<>();

        //add a fake volume entry for unit tests. This entry has an uuid which will not be used in real-life
        volumeMap.put(UNITTEST_VOLUME_ID, UNITTEST_VOLUME_NAME);

        //add special volume ids that we know of
        volumeMap.put("primary", null); //the most common one where we will NOT put text for
        volumeMap.put("home", "[Documents]"); //example Uri pointing to /Documents/cgeo: content://com.android.externalstorage.documents/tree/home%3Acgeo

        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && CgeoApplication.getInstance() != null) {
            final Context context = CgeoApplication.getInstance().getApplicationContext();
            final StorageManager storageManager = ContextCompat.getSystemService(context, StorageManager.class);
            final List<StorageVolume> storageVolumes = storageManager.getStorageVolumes();
            for (StorageVolume sv : storageVolumes) {
                volumeMap.put(sv.getUuid(), sv.getDescription(context));
            }
        } else {
            //at least we create a default entry for the primary drive
            volumeMap.put(null, "internal shared storage");
        }
        return volumeMap;
    }
Get a mapping for all current volumes (UUIDs) to their display name.
This might work better or worse depending on Android version and context state. In any case a map object is returned
<br>
Output (if context is available) is most likely a map with
* a null-key for internal storage description
* additional keys for each external storage with its Id as used in 'tree' expression and its name
<br>
Real-world example: SDK29 emulator returns maps with at least the following entries:
* null -> "internal shared storage" (this one is returned by Android Volume Manager. It will not be used for display)
* "16EA-2F02" -> "SDCARD" (that's a typical entry for an SD card as returned by Android Volume Manager)
* "primary" -> null (used for internal storage in Uris. We add the entry to document that "primary" exists but should not be displayed)
* some special volume mappings e.g. for "home" (points to "Document" directory)
* A dummy entry for unit-tests
<br>
In an Uri, the "volume id" is typically written directly behind "/tree". In the following uri
the "volumeId" is "primary" (the most common one, refering to internal storage):
content://com.android.externalstorage.documents/tree/primary%3Acgeo
main/src/main/java/cgeo/geocaching/utils/UriUtils.java