Sending a mail to self crashes gmail

b/17517391

When emailing yourself in Gmail, the initial entry in the messages
table is written with a NULL fromAddress. When the Gmail server
responds from the call to actually send the message, the sender is
then filled in. This brief period of time where the fromAddress is
(needlessly) NULL produces cursors that report the sender name and
email address as NULL.

To sidestep this problem, SendersView now takes the current Account
as an argument and, if no proper sender information can be located,
falls back to displaying the avatar of the current account, which
should typically always match the sender.

Change-Id: Ibe052dc948ff90e319a287ee1fb8cc8b707991b2
5 files changed