Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef15c8e4 authored by Josh Gargus's avatar Josh Gargus
Browse files

Fix failure to save a new contact with a photo.

When saving a new contact, we don't know the raw-contact id and
therefore use a "random" negative number.  If the new contact has a
photo, we attempt to save it at a bogus path generated from this id.

This manifests as a NullPointerException due to a bug in our
exception-handling code.  However, fixing this bug isn't enough
because we still need the photo to save properly.

To achieve this, we check for a negative raw-contact id before saving
the photo.  If we detect one, we replace it with the newly-generated
id that we just obtained when we first saved the raw-contact.

Bug: 5937734
Change-Id: Icba2be0e21885fcb418ea9c8c12ebc9820f33bfd
parent e286c04b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment