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
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index 5f55f80..cce48dd 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -224,7 +224,7 @@
 
         // Set the details header, based on the first phone call.
         mPhoneCallDetailsHelper.setPhoneCallDetails(mPhoneCallDetailsViews,
-                details[0], false);
+                details[0], false, false);
 
         // Cache the details about the phone number.
         final Uri numberCallUri = mPhoneNumberHelper.getCallUri(mNumber);