History log of /packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d5678d3c22b7ab82b3840000704ce10162534d5d 28-Aug-2011 Flavio Lerda <flerda@google.com> Use "Add to contacts" as header for unknown numbers.

Instead of repeating the number twice (in the header and in the
underlying call button), use the string "Add to contacts" instead, which
better represents the action performed by the header when clicked.

Bug: 5205326
Change-Id: I568373db2bbbd0ab7d5645a70eb25fbd577dca1e
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
e4b156d0d3b69e8c8b32c8f601b051d7750a5f84 14-Aug-2011 Flavio Lerda <flerda@google.com> Do not show geocode for voicemail number.

As I moved the geocoding to the content provider, we lost the fact that
the voicemail number should not be geocoded, because the voicemail
number can change over time and the provider does not know what it is.

Instead, this change adds an explicit check in the UI code.

Note that this was caught by a unit test, but unfortunately I did not
notice I broke it when I moved the geocoding to the content provider.

Bug: 5111400
Change-Id: Ia14d8ac1a22b52e36bdac784fad5fea706865cb7
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
71fc6ec6598aeb8dcad797c05816bab91762e2b3 09-Aug-2011 Flavio Lerda <flerda@google.com> Use geocoded location from call log content provider.

When showing the geocoded location in the call log, use the value from
the provider instead of querying the geocoder each time: that would be
too slow and cause a strict mode violation.

Bug: 5129581
Change-Id: Ia0eb5bdd33c5bcebcf6267ce01f7d36c53396c30
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
fe17026100674b204f3b4fc6cb5a61f51ac99ec6 03-Aug-2011 Flavio Lerda <flerda@google.com> Use a single text view for count and date of calls.

This further reduces the number of views needed to render the call log.

At the same time, fix a few minor issues that are needed for pixel
perfect UI:
- Do not show the text when the item is new.
- Instead, for new items, highlight the date in the color associated
with the item (blue for voicemail, red for missed calls).
- Do not put a separating slash between the count and the date.

Bug: 5099652
Change-Id: I18b71463e7398f00f0fe8fecbeb334b67d618312
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
b88abaaf3e733a9daf681277b7e5e8e58c015462 03-Aug-2011 Flavio Lerda <flerda@google.com> Use simple TextView for call details header.

Instead of the using the more complex call_log_phone_call_details
layout, use just a text view, since all we want to show is the name (or
number) of the person who called.

Bug: 5099652
Change-Id: I408b5ffaeea09c0efe2631bd317d1ea640be294f
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
6ecb732e22b271878d5f9215b7c821a1d97d888f 02-Aug-2011 Daniel Lehmann <lehmannd@google.com> Replace the list of call symbols by a single custom view to paint them.

Saves about 7-21 views per screen and should be more efficient to recycle

Bug:5099652
Change-Id: I10a1b1d188c5c58329de4ba063d41f8c116c3497
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
be45e0f3d9ba9b0f842174d857a99edeadc0136e 25-Jul-2011 Flavio Lerda <flerda@google.com> Use a "dash" for a phone number that we cannot geocode.

Bug: 5073215
Change-Id: I19f79a658cb19abd95e0b6b35f9602c1810faaad
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
405695664582b4989cffcf054bf1aceb83dec437 22-Jul-2011 Flavio Lerda <flerda@google.com> Updates to visual design.

- Use sizes from spec.
- Show only contact name in call details header.
- Add spacing between contact icons.
- Updates a few assets.
- Add contentDescription to a number of elements.
- Use @dimen instead of ?attr for dimensions.

Bug: 4989127
Bug: 4989128
Bug: 5039572
Bug: 5038409
Change-Id: I3a59af44c77f739185feef39afd57193b5e0176a
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
ebef7717c62e15d69c0965ec7a56c4f16341dff3 20-Jul-2011 Flavio Lerda <flerda@google.com> Do not expose parsePhoneNumber in PhoneNumberHelper.

Instead, do the call within getGeocodeForNumber, so that we have a
single call now that we need to make asynchronously.

Bug: 5046550
Change-Id: I54fddefa3f7c8d29bcd60b0d96162211f90520c9
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
9c466374c2cb5371197334bde701dc8f452ebf03 19-Jul-2011 Flavio Lerda <flerda@google.com> Delay computing of PhoneNumber as much as possible.

Computing PhoneNumber is an expensive operation. We want to make that
asynchronous and it is currently only used together with the offline
geocoder, which also needs to be asynchronous.

Therefore, delay the call to generate a PhoneNumer until it is actually
needed, i.e., at the same time as computing the geocode. This means we
only need to make one call asynchronous instead of many.

Change-Id: Iebebf098be713281b2976c72506e480466fb65d4
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
cb805e853dce5fc4d434f2b1916b154d80ab1744 18-Jul-2011 Flavio Lerda <flerda@google.com> Use geocoded description in the call log.

If a number is not associated with a contact, try to get the location
for that phone number and show that instead.

This is shown below the phone number, since the phone number is still
the most useful information for the user.

Bug: 4968253
Change-Id: If9c29c2e20f96f10e24fcf97ccac85eada237b71
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
8e39c71705261fa97adf1b6f39336a7fbd2a2c65 15-Jul-2011 Flavio Lerda <flerda@google.com> Show a count for more than 3 calls in a group.

The count represents the total count.

The icons for the call types of the 3 most recent calls are shown.

Change-Id: I1e7a4d2421b5fafa222793c3a4732b134633b828
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
76921903290ba9229e0238395c35569cbadecb20 13-Jul-2011 Flavio Lerda <flerda@google.com> Split new and older items in the call log.

This commit changes the way call log items are displayed.

Instead of using a single cursor showing all items, it creates two
cursors, one for new items (missed calls and voicemail with the NEW
field set to 1) and older items (missed calls and voicemail with the NEW
field set to 0 and incoming and outgoing calls).

To make this as much as possible transparent to the UI code, it actually
creates a merged cursor from the two cursor above, so that the UI does
not need to know about the fact that these correspond to two different
queries.

To allocate space for the headers (which are present only if the
underlying cursor is not empty), they are also added to the merged
cursor, using MatrixCursors.

Since the UI needs to know whether to show a header, a new call log
item, or an older call log item, add a synthetic column called "section"
which represents which section a given row belongs to.

In the process, encapsulate the details of the queries being made to the
call log. Probably a follow-up can be done to further hide the details
of how the query works.

Change-Id: I0be6ac5b4ca5b0ccd74a648a5d8687e05ad77a82
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
178eeebac88b352c131bd0315a99da16162c986e 11-Jul-2011 Flavio Lerda <flerda@google.com> Open groups of calls in the CallDetailActivity.

This change allow showing the details of a group of calls in the
CallDetailActivity.

First of all, it adds a way to pass to the activity a list of calls,
namely by using an extra containing a list of ids of rows in the call
log. It preserves the existing mean to open the call details using a URI
for backward compatibility.

In turns, the activity will get the details of each call, assuming they
all come from the same number and therefore the same person, and show a
single contact header at the top, while placing the detail of each of
the calls in the list at the bottom of the activity.

With that done, we no longer allow opening up groups of calls in the
call log: they are no longer necessary, as the details of the calls
within a group are now accessible in the details page.

In the process, extract a utility class that encapsulates operations on
phone number, like whether calls can be placed to a phone number, and
how to display the number to the user. There might be a few more places
where this helper can be used, but I will look at those in a follow-up.

A few optimizations still need to be pursued, for instance the lookup of
the details of the phone calls in a group can be optimized.

Another candidate for a follow-up is using a common ContactInfo class
between the call log and the call details, maybe with shared functions
to extra the information from a cursor.

A further improvement would be to have a shared cache of the contact
info and call log details, so that looking up the information when
opening the call details can be done more efficiently (it is currently a
strict mode violation) since the call details will generally require
information which had already been looked up by the call log beforehand.

Change-Id: I408650d7485afe4c132dd9cc376e6ba0e3388c1e
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
9a208cc08567a3d86c7968d7a4f13f5714b9b657 12-Jul-2011 Flavio Lerda <flerda@google.com> Details for multiple calls.

Add the details of the call at the bottom of the call details in a list.

The code allows having multiple details listed at the bottom, but
currently we only have one. A follow-up will add details for multiple
calls.

Change-Id: I0a91cc372f658bada603e22b9438a6db771dc124
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
223a843a7290517eccf340817cdae424658dd0da 11-Jul-2011 Flavio Lerda <flerda@google.com> Allow for multiple call icons in the call log.

This commit adds support for having multiple call icons on a single
entry, to handle group entries.

When the group is represented as text, we currently use only the first
call type, but, in a follow-up, I will use an additional counter.

Change-Id: Iaa9d1c84eb926c1500bf0a439d45ce59314bd198
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
371d5f97d0b87ea0c9d8e8e178c04df34336a29e 09-Jul-2011 Flavio Lerda <flerda@google.com> Update the formatting of call log entries.

Use the three line style that is also used in the details view, in fact,
reuse the helper class and layout from that class.

Fix a few cases that were correctly handled by the call log list but not
by the details view.

Change-Id: I32e6516a571d6e3d95b5f0e414a4fc711cb6a51b
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
4586febe3637303ab6f1b24fc5a23750aa3a6259 09-Jul-2011 Flavio Lerda <flerda@google.com> Show text or icons for call log items.

The current code uses the small icons to show the type of call. The
design we want to implement allows for both icons and text to be
present, depending on the context.

This change adds a boolean flag to determine which one to use.

Change-Id: Ia3ec8bba44f46a4b4857654ffc0256e1af909741
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
9de38681c1d037100a978a5820c09cb74c0d6fee 08-Jul-2011 Flavio Lerda <flerda@google.com> Extract a PhoneCallDetails class.

This reduces the number of parameters passed around and makes it easier
to add additional fields to it (e.g., I need to handle entries
corresponding to multiple calls).

Change-Id: I724cfa78949cc0e4ff7c9a287b4f59f676d92fb1
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
b9256f81c0c65da98fb53b7d1879d71183d852b8 09-Jul-2011 Flavio Lerda <flerda@google.com> Use the correct number for display.

Also add a couple of final modifiers to make the flow clearer.

Change-Id: Id2a4b1508f1202da0e411df194e38808d8d7c1a8
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
7d7473a1efca1fa02b52d54e5b71003c948ba49b 06-Jul-2011 Flavio Lerda <flerda@google.com> Replace text with icon for call type.

The design is to have an icon to indicate the call type instead of a
piece of text. Since we plan to have multiple icons for groups, use a
LinearLayout to store the actual icons.

Change-Id: I0055eca8eff8a9bc038aa6f152f486c18a6592c5
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
696e8132c3cc9dd8ef2060a83c9d15f35c2b316b 05-Jul-2011 Flavio Lerda <flerda@google.com> Handles special numbers in call details page.

Some numbers (unknown, private, payphones, and voicemails) should be
shown using text instead of the row number strings.

Change-Id: I297d44bd762548f08c975adc1ba56fc4a9edd146
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
d72bf8a27d12efd492df7333f1f8590a9eb6f097 05-Jul-2011 Flavio Lerda <flerda@google.com> Cache values extracted from resources.

Change-Id: I672710e691eaee135a0d688ef5ef80abed1ed27a
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java
afb93bb5893c7c64be3f32598b383fdf589c29d8 05-Jul-2011 Flavio Lerda <flerda@google.com> Extract logic from PhoneCallDetailsViews.

Instead of having the logic in the views object, use a helper class. The
advantage is that we can have a single instance of this class and I will
do some optimizations in a follow-up changelist.

Change-Id: I6258e947aa33a2a3b6e72d7273a3b7e080c5d7e5
/packages/apps/Contacts/src/com/android/contacts/PhoneCallDetailsHelper.java