am fb10a760: am 79204a32: am 15369c6c: Merge "Fix volume naming when surfaced over MTP." into mnc-dev
* commit 'fb10a760c660385d1abbd0ed45d0a72bb812e6d4': Fix volume naming when surfaced over MTP.
This commit is contained in:
@@ -232,7 +232,7 @@ public class VolumeInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable String getDescription() {
|
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);
|
return Resources.getSystem().getString(com.android.internal.R.string.storage_internal);
|
||||||
} else if (!TextUtils.isEmpty(fsLabel)) {
|
} else if (!TextUtils.isEmpty(fsLabel)) {
|
||||||
return fsLabel;
|
return fsLabel;
|
||||||
@@ -317,6 +317,9 @@ public class VolumeInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String description = getDescription();
|
String description = getDescription();
|
||||||
|
if (description == null) {
|
||||||
|
description = getFsUuid();
|
||||||
|
}
|
||||||
if (description == null) {
|
if (description == null) {
|
||||||
description = context.getString(android.R.string.unknownName);
|
description = context.getString(android.R.string.unknownName);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user