Don't allow empty or null filenames
b/14500106 Change-Id: I519e4a0fe392c3bdbb84f1ccbdea89f07b9c1426
This commit is contained in:
parent
611e49e41a
commit
d0b54a2948
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user