Fix inserting photos into unwriteable contacts
When someone tries to ATTACH_DATA a photo onto an unwriteable contact,
insert a writeable raw_contact into that contact in order to
make this possible.
Sometimes we need to prompt the user to set their backup account,
which is a bit awkward.
Testing: I manually tried inserting photos into an unwriteable contact,
in the following ways:
* Only having a witeable account on the phone (WhatsApp and nothing else)
* Not having a writeable account on the phone and opting to store locally
* Not having a backup account set, and choosing the default when
inserting a photo
* Not having a backup account set, and not choosing the default when
inserting a photo
* Having a backup account set (this is the case from b/14577185
Bug: 14577185
Change-Id: I9b8b5f5108725e8b69b58fd12f7aaa52d2a7d531
1 file changed