Commit cf8031f1 authored by Sergey Galin's avatar Sergey Galin

Fix non-attaching one file to e-mail when using list of attachments

parent 90870ae4
......@@ -328,7 +328,12 @@ public class DesktopUtils
uri.add(FileProvider.getUriForFile(ctx, authorities, new File(fileName)));
}
}
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uri);
// Should not put array with only one element into intent because of a bug in GMail.
if (uri.size() == 1) {
intent.putExtra(Intent.EXTRA_STREAM, uri.get(0));
} else {
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uri);
}
}
final IntentResolverInfo mailtoIntentResolvers = new IntentResolverInfo(ctx.getPackageManager());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment