summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-10-24 21:32:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-24 21:33:00 +0000
commitcc66a236f90cbef7f9562b4179c3aec517f4f082 (patch)
tree4aec3625ace6dbac027072b9cc2a79063e4c672b
parent91a1a7296b776400b9c863ec094cd135614c6fbb (diff)
parentc99d00be675fa34944d47d340f4168564bd4cd64 (diff)
downloadframeworks_base-cc66a236f90cbef7f9562b4179c3aec517f4f082.zip
frameworks_base-cc66a236f90cbef7f9562b4179c3aec517f4f082.tar.gz
frameworks_base-cc66a236f90cbef7f9562b4179c3aec517f4f082.tar.bz2
Merge "Use default volume description when missing label." into lmp-mr1-dev
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index c323a33..066acac 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -154,7 +154,12 @@ public class ExternalStorageProvider extends DocumentsProvider {
if (ROOT_ID_PRIMARY_EMULATED.equals(rootId)) {
root.title = getContext().getString(R.string.root_internal_storage);
} else {
- root.title = volume.getUserLabel();
+ final String userLabel = volume.getUserLabel();
+ if (!TextUtils.isEmpty(userLabel)) {
+ root.title = userLabel;
+ } else {
+ root.title = volume.getDescription(getContext());
+ }
}
root.docId = getDocIdForFile(path);
mRoots.add(root);