Merge "Use default volume description when missing label." into lmp-mr1-dev

automerge: cc66a23

* commit 'cc66a236f90cbef7f9562b4179c3aec517f4f082':
  Use default volume description when missing label.
This commit is contained in:
Jeff Sharkey
2014-10-24 21:41:19 +00:00
committed by android-build-merger

View File

@ -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);