diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-10-24 21:32:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-24 21:33:00 +0000 |
commit | cc66a236f90cbef7f9562b4179c3aec517f4f082 (patch) | |
tree | 4aec3625ace6dbac027072b9cc2a79063e4c672b | |
parent | 91a1a7296b776400b9c863ec094cd135614c6fbb (diff) | |
parent | c99d00be675fa34944d47d340f4168564bd4cd64 (diff) | |
download | frameworks_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.java | 7 |
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); |