History log of /packages/apps/Contacts/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e0b2f1e2d01d1ac52ba207dc7ce76971d853298e 12-Jun-2012 Chiao Cheng <chiaocheng@google.com> Global import order fix.

Changed import order to be in accordance with style guide:
http://source.android.com/source/code-style.html#order-import-statements

Static imports will be placed at the top since most existing files used that
convention. It is also a style that can be handled by both eclipse and intellij.

Change-Id: Ia7013c7a2d88e5fefb8f4975d121f7fcd3fcc462
/packages/apps/Contacts/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
be15e0997ff7559d1c58abfcf45bcb1332dfc5eb 10-Aug-2011 Flavio Lerda <flerda@google.com> Partial fix for tests.

Change Ia0eb5bdd33c5bcebcf6267ce01f7d36c53396c30 added a new field to
the CallLogQuery: add it in the tests as well.

Change I45615616e03a603759888d9e7169a853b3328b14 added a new field to
ContactLoader: add it in the tests as well.

Change Ife8d494c19e2daef7e59d819ded52638dc9f2b6f removed bold first
names: remove from the tests the checks for bold in the names.

This helps getting further, but it does not actually fix all the tests.
The other errors might need a bit more investigation.

In the meanwhile this should not hurt.

Change-Id: Ib116b9a24002f1ee05b9246cbe985302b88a955b
/packages/apps/Contacts/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
78f20ab1daa5f8330875c3e7ba1d391abb9c0c57 03-Aug-2011 Flavio Lerda <flerda@google.com> Fixes tests.

For the case of more than 3 calls, we show the total count.

Bug: 5112288
Change-Id: I9ebb518b35f600a783023ba764319b33237b4cd4
/packages/apps/Contacts/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.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/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java