History log of /packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
76ced03e35e37d717a8c0bc0cca3b3f28609d85e 23-Nov-2011 Flavio Lerda <flerda@google.com> Follow-up on previous fix.

Correctly handle the case of a null country iso when working with an
upgraded call log.

The syntax for nulls requires the value to be passes as "IS NULL"
instead of using "= ?" and passing a null value.

Bug: 5638376
Change-Id: Icdc0278570495d4abff453e8505649c2b7425c99
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
c89565e1beec2ef986967a6330f1e7b0231a3c53 19-Nov-2011 Flavio Lerda <flerda@google.com> Store contact info using country iso as well.

Currently we are using just the number to store contact information that
we look-up. However, the look-up result depends also on the country in
which the call was placed or received.

This can lead to issues if the result is not the same depending on the
contact. This is particularly problematic in case of upgrades: the call
log will contain a number of entries without a country iso value since
the field was introduced after the Gingerbread release.

Use the country iso both when storing the contact in the in-memory
cache, as well as when updating the cache stored in the call log itself.

Bug: 5638376
Change-Id: I4c77556395147f05c2524d93cc1c800943395b6c
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
1c6f3817e9e889664d143ed5ea5147aca595dd21 18-Oct-2011 Flavio Lerda <flerda@google.com> Remove CallLogActivity.

CallLogActivity was only used by tests. Instead, extend
FragmentTestActivity to handle loading of an arbitrary fragment into it,
so that we can test the CallLogFragment within it.

So far, FragmentTestActivity was only used with a UI-less fragment,
which therefore did not need a placeholder for the fragment.

Bug: 5286366
Change-Id: I939d6fb212621345b8a1ba4ec1a3b1c56909ce50
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
0646f2712e8b4a5ada51bd586d5f179d38a304c5 17-Oct-2011 Flavio Lerda <flerda@google.com> Use framework API to match voicemail number.

We were tracking the voicemail number within the application. This has
two shortcomings: it would not be updated automatically when its value
changes and the matching against it was only based on it being
identical, without taking into account other possible formatting
differences.

Switch to use PhoneNumberUtils.isVoiceMailNumber() instead, which is
what the Phone app is also using.

Bug: 5435925
Bug: 5416495
Change-Id: Ie56363c578cf5f6102fd6880ffce14f608ddaf0b
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
76821d02351701b3829aa5754dd9a86e417f635f 10-Oct-2011 Flavio Lerda <flerda@google.com> Only show recent items in the new section.

This commit limits the set of items in the new section to items that
have been receiving within the last 7 days.

In order to make the unread items more visible even when they are not in
the new section, use highlighting on them, both in the text and the play
icon.

Bug: 5403047
Change-Id: I577c58bfcb9ef2031839092d50f41c357c7decba
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
731f861593f3de69e8b3070b46e589cab42341f9 07-Oct-2011 Flavio Lerda <flerda@google.com> Share contact look up between call log and call details.

Currently, it is possible to get a contact be correctly identified in
the call log, but not in the details, because the logic to do the
look-up are completely separate.

For example, SIP contacts are correctly looked up by the call log, but
not by the details. Moreover, we recently fixed a few bugs in the logic
for looking up contacts in the call log, that have not been propagated
to the call details because the code is independent.

This commit moves the whole logic of looking up a contact given a number
(which may be a SIP number) from the CallLogAdapter into its own class.
Then, CallDetailActivity can use that to look up the contact in a way
that is guaranteed to yield the same result.

Bug: 5415134
Change-Id: I73acc39ba5dc65ecce6861f210224304fd91822d
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
74628686391735dac1b13409e7f61e9f1514ea20 06-Oct-2011 Flavio Lerda <flerda@google.com> Remove strict mode violation with number formatting.

The call log is currently performing formatting on phone numbers in the
main thread (during bind view).

At the same time, however, we are always doing a background request to
look-up the contacts. Move the formatting call to the background thread.

In order for the right information to be shown as soon as the call log
is opened, we also need to store this information in our cached values
in the database. This means that the number will show unformatted the
very first time, and then updated once the background require is
completed.

Bug: 5316982
Change-Id: I20d1971948afa33c7825f0bd38a9520021f75378
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
f6668539e2016871948eb9e532fdfed09b904dde 05-Oct-2011 Flavio Lerda <flerda@google.com> Merge "Revert "Remove strict mode violation with number formatting.""
55e30c7a0feb8fe533b489c6c053454bfb2eb155 05-Oct-2011 Flavio Lerda <flerda@google.com> Revert "Remove strict mode violation with number formatting."

This reverts commit bbe62216b5163ec53eb990218bdbe608631dd8e7

Broke the build.
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
d2debeaa2780b95f7feb51ec466290596ffe5a4c 05-Oct-2011 Daniel Lehmann <lehmannd@google.com> Merge "Remove strict mode violation with number formatting."
bbe62216b5163ec53eb990218bdbe608631dd8e7 28-Sep-2011 Flavio Lerda <flerda@google.com> Remove strict mode violation with number formatting.

The call log is currently performing formatting on phone numbers in the
main thread (during bind view).

At the same time, however, we are always doing a background request to
look-up the contacts. Move the formatting call to the background thread.

In order for the right information to be shown as soon as the call log
is opened, we also need to store this information in our cached values
in the database. This means that the number will show unformatted the
very first time, and then updated once the background require is
completed.

Bug: 5316982
Change-Id: If1e4990243e73af6c9519fbf5e76a5d234e99e15
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
6858dd385827345713f36372cadcefaa7194c91f 01-Oct-2011 Flavio Lerda <flerda@google.com> Fix looking up of contacts for SIP calls.

Currently, for a SIP call we only look up whether there is a matching
SIP address on one of the contacts.

However, it is also possible to receive calls from regular phone numbers
on a SIP account, e.g., if there is a incoming calls number associated
with the account.

In those cases, the SIP address of the caller is of the form
<number>@<domain>.

This commit changes the look-up code for SIP calls in the call log to
fall back to looking up the <number> part of a SIP address if there is
not a match within the SIP addresses of contacts.

This is in line with what is already done for incoming and outgoing
calls placed via SIP to regular phone number.

Bug: 5390366
Change-Id: I98b359eee08a943f9cef719390bb8dcb4da09b67
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
ecfc26c3f9495f1a4efed69a1582ff2b0deb2c71 13-Sep-2011 Daniel Lehmann <lehmannd@google.com> New avatars

Bug:5074147

Change-Id: I583d22c63a7b617567c523efeed292ae1e2be7e4
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
02901c0243ca44b875b0db3c4cc0531d5ec08411 14-Sep-2011 Flavio Lerda <flerda@google.com> Merge "Extend the call log highlight to include the call icon."
ce75bc9a12881c48c5f7e208a47fadcc8b6a04a7 13-Sep-2011 Flavio Lerda <flerda@google.com> Do not look up a contact for special numbers.

Do not attempt to look up a contact for unknown, private, phonebox, and
voicemail numbers. Instead, use the raw number, which will then
correctly be formatted by the UI.

Bug: 5293193
Change-Id: I4315b56d19b802ad701bab806fd278a1e14c240c
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
73215d678536d3b057a0f0dd1c045250dbe9ed65 13-Sep-2011 Flavio Lerda <flerda@google.com> Extend the call log highlight to include the call icon.

This commit moves the call icon (the secondary action) within the
primary action, which means the highlight for the primary action will
extend to it.

In order to preserve accessibility, it add a nextFocusRight and
nextFocusLeft to the primary and secondary actions, so that it is
possible to navigate between them.

Bug: 5290460
Change-Id: I75f1ca5530d9e656d54f32b58bc1cb04bfc6bed6
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
c071dc49418588dc01b987d291ee45dbe41c3d82 06-Sep-2011 Flavio Lerda <flerda@google.com> Maintain the current view (voicemail only or all calls) on updates.

When the underlying content provider content changes, keep the same view
(voicemail only or all calls) as the one the user is looking at.

The underlying data may change because we updated some of the cached
columns, which currently causes the view to be updated for what seems to
the user no valid reason.

The only events we want to be sure to communicate to the user are new
voicemail and missed calls, but the notification bar takes care of those
cases, and if the application is currently open, we will refresh the
content anyway when resumed.

Bug: 5247042
Change-Id: I6db0a980aaafed5990f8e84bf4a9a1d0f44efb36
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
f66d9f35879365c43adcd17549ad97e421123571 05-Sep-2011 Flavio Lerda <flerda@google.com> Pixel perfect work on call log.

- Divider color updated based on feedback from designer.
- Updated header to use new platform level style.

Bug: 5258258
Change-Id: I6152329d8c0f50d644082d3a2dc1cb4c0472ba60
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
fca72fa1f2bf030b3e35635508132b5ad328eab6 28-Aug-2011 Flavio Lerda <flerda@google.com> Pixel perfect work on call log.

- Show a divider only between call log items, not when there is a
section header.
- Format the phone label in the call details in white instead of gray.

Bug: 5225943
Change-Id: Ia7b959bae19f9e38021f173f23cd48ae67a84fe0
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
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/calllog/CallLogAdapter.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/calllog/CallLogAdapter.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/calllog/CallLogAdapter.java
f78a59076ab7700f0f7482d9935763dcab235563 14-Aug-2011 Flavio Lerda <flerda@google.com> Update the call log contact info cache.

Now that we use the call log cache again, we should also update it when
we find more up-to-date information when looking up in the contacts
database.

Bug: 5101753
Change-Id: I408c1d5c8ec3752d5c15e761274eb06fb9242de6
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
b5f6432139f887e6f65e1206e927f57cfb670cc6 13-Aug-2011 Flavio Lerda <flerda@google.com> Use the content of the call log to predict the contact info.

This change re-instroduces the cache stored in the call log table for
the contact info associated with a call.

This is the first part of the necessary changes. In this change, I also
use the stored information, I do not update it when the contact is
actually looked up in the call log.

Bug: 5101753
Change-Id: Ib906e9af06410c2cc295192cd4623b011fa0ad09
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
de4f16aa0ff53c2756a3f9bf67ad7cb59b4d1aa3 13-Aug-2011 Flavio Lerda <flerda@google.com> Clean-up after extracting nested classes from CallLogFragment.

A few fields were made package accessible: fix those up.

Also, move around a couple of interfaces to the most appropriate
location.

Bug: 5101753
Change-Id: I34af0dc6401874d9c8c71932bce239852d42f703
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java
568ad27e706d7c75dd7412e34c2236c772704a04 13-Aug-2011 Flavio Lerda <flerda@google.com> Extract nested classes from CallLogFragment.

This should help making the changes to the CallLogFragment easier to
make as there is less code around.

This has been done entired using Eclipse's refactoring with no manual
changes.

In the process, a couple of fields have been expanded from private to
package, because, while their were private, they were being used by
the parent/nested class anyway. I will fix those in a follow-up.

Bug: 5101753
Change-Id: Id46e18cfa86939100342daa020430063959dfcfc
/packages/apps/Contacts/src/com/android/contacts/calllog/CallLogAdapter.java