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

Commit 7a788a86 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Fix volume naming when surfaced over MTP.

Otherwise we show everything as "Unknown."

Bug: 22256092
Change-Id: I19fe8a25aff02db8ca9aff288e6715d469f65327
parent 384a04d9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ public class VolumeInfo implements Parcelable {
    }

    public @Nullable String getDescription() {
        if (ID_PRIVATE_INTERNAL.equals(id)) {
        if (ID_PRIVATE_INTERNAL.equals(id) || ID_EMULATED_INTERNAL.equals(id)) {
            return Resources.getSystem().getString(com.android.internal.R.string.storage_internal);
        } else if (!TextUtils.isEmpty(fsLabel)) {
            return fsLabel;
@@ -317,6 +317,9 @@ public class VolumeInfo implements Parcelable {
        }

        String description = getDescription();
        if (description == null) {
            description = getFsUuid();
        }
        if (description == null) {
            description = context.getString(android.R.string.unknownName);
        }