History log of /packages/apps/Contacts/src/com/android/contacts/util/UriUtils.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4813c270af2b5d904437757807541f1f5e19bb93 19-Aug-2011 Flavio Lerda <flerda@google.com> Use the call log to cache additional contact information.

The new version of the call log needs a bit more information about the
matching contact (if any) to render its entries.

This change both uses the newly added columns in the call log to lookup
this values and stores the updated values back into the call log.

These values are used for setting up the quick contact badge and
formatting the phone number.

This also fixes a few smaller issues:
- the phone number shown used to change format between the initially set
value to the one obtained from the contact: this value is now cached.
- we were using -1 as the id of a non-existing contact, but 0 is
actually the value used elsewhere for this, so stick to that.
- make sure we use the cached value from the call log for formatting.
- update the call log if there was no previous value.
- introduce a UriUtils with a couple of useful functions for handling
URIs.

Bug: 5101753
Change-Id: I22f2b03b234da91e02dbeebe11a94c2f56295a3d
/packages/apps/Contacts/src/com/android/contacts/util/UriUtils.java
5ee899e689a8ddcc500655f24b0bcdfdbf401702 23-Aug-2011 Flavio Lerda <flerda@google.com> Use photo id when available.

Photo id is a long that uniquely identifies a photo associated with a
contact. It only handles low-res photos, but that's what's used in the
call log anyway.

This commit uses photo ids instead of thumbnail URIs if the photo id is
available, since that's more efficient for storage purposes. In fact, if
a photo id is available it does not even bother storing the URI.

This will make a significant difference in terms of storage when I will
use the call log table to store cached contact information, including
the photo id and thumbnail URI.

Bug: 5101753
Change-Id: Ia60e3ce33763fe3744208763befbaf4489d60bdd
/packages/apps/Contacts/src/com/android/contacts/util/UriUtils.java
071aa0d0511cbffac933539eaa484860fae2132d 22-Aug-2011 Flavio Lerda <flerda@google.com> Use Contact URIs instead of contact ids.

Contact ids are not guaranteed to be stable.

Instead use a contact URI (which contains both a lookup key and a
contact id, used only as a hint).

This change is needed for caching, since we do not what to cache the
unstable contact ids.

Bug: 5101753
Change-Id: I34814c8935e706ee898adcedc39c4baeea147d67
/packages/apps/Contacts/src/com/android/contacts/util/UriUtils.java