Merge "Don't allow empty or null filenames" into ub-mail-master

This commit is contained in:
Tony Mantler 2014-05-05 16:14:56 +00:00 committed by Android (Google) Code Review
commit 564a5343cc

View File

@ -410,7 +410,7 @@ public class AttachmentUtilities {
size = copyFile(in, resolver.openOutputStream(attUri));
contentUri = attUri.toString();
} else if (Utility.isExternalStorageMounted()) {
if (attachment.mFileName == null) {
if (TextUtils.isEmpty(attachment.mFileName)) {
// TODO: This will prevent a crash but does not surface the underlying problem
// to the user correctly.
LogUtils.w(Logging.LOG_TAG, "Trying to save an attachment with no name: %d",