Do not trust server-provided content type for attachments
* Fixes a bug that caused some attachments to be labeled with the
wrong content type and thus unable to be opened by local apps.
* When the attachment code was written, MimeTypeMap had very few
entries, so we tried to get the mime type of Exchange attachments
from the stream when the file was read off the server. It turns
out that the server's idea of mime type is unpredictable
* In the meantime, MimeTypeMap has been fleshed out, so we really
do know the type in the vast majority of cases (and including all
common document types)
* The fix is to remove the lines related to reading the mime
type from the attachment stream
* Content type is set (properly) when attachment record is created. See
EasEmailSyncParser.getMimeTypeFromFileName() for details.
Fixes bug http://b/2182955
1 file changed