auto import from //branches/cupcake/...@132569
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 991fa0b..05b51cd 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -230,6 +230,7 @@
 
         <activity android:name="CallDetailActivity"
             android:label="@string/callDetailTitle"
+            android:theme="@android:style/Theme.NoTitleBar"
         >
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
diff --git a/res/layout-finger/call_detail.xml b/res/layout-finger/call_detail.xml
index c9fc500..69bfa9e 100644
--- a/res/layout-finger/call_detail.xml
+++ b/res/layout-finger/call_detail.xml
@@ -14,9 +14,76 @@
      limitations under the License.
 -->
 
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@android:id/list"
-    android:layout_width="fill_parent" 
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:scrollbarStyle="outsideOverlay"
-/>
\ No newline at end of file
+    android:orientation="vertical"
+>
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@android:drawable/title_bar_tall"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+        android:paddingLeft="9dip"
+        android:paddingRight="5dip"
+    >
+    
+        <ImageView android:id="@+id/icon"
+            android:layout_width="32dip"
+            android:layout_height="32dip"
+            android:layout_marginRight="5dip"
+        />
+            
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="vertical"
+            android:layout_marginLeft="5dip"
+        >
+        
+            <TextView android:id="@+id/type"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+            />
+        
+            <TextView android:id="@+id/time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textColor="?android:attr/textColorPrimaryInverse"
+            />
+        
+            <TextView android:id="@+id/duration"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textColor="?android:attr/textColorPrimaryInverse"
+            />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <FrameLayout
+        android:layout_height="0dip"
+        android:layout_width="fill_parent"
+        android:layout_weight="1"
+    >
+        <ListView android:id="@android:id/list"
+            android:layout_width="fill_parent" 
+            android:layout_height="fill_parent"
+            android:scrollbarStyle="outsideOverlay"
+        />
+
+        <View
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/title_bar_shadow"
+        />
+
+    </FrameLayout>
+</LinearLayout>
diff --git a/res/layout-finger/call_detail_item.xml b/res/layout-finger/call_detail_item.xml
deleted file mode 100644
index 7970735..0000000
--- a/res/layout-finger/call_detail_item.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:stretchColumns="1"
-    android:shrinkColumns="0,1,2"
-    android:paddingLeft="12dip"
-    android:paddingRight="12dip"
->
-
-    <TableRow
-        android:paddingTop="12dip"
-        android:paddingBottom="12dip"
-        android:gravity="center_vertical"
-    >
-
-        <TextView
-            android:text="@string/call_type"
-            android:layout_width="80dip"
-            android:layout_marginRight="12dip"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-        />
-
-        <TextView android:id="@+id/call_type"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-        />
-
-        <ImageView android:id="@+id/call_type_icon" />
-
-    </TableRow>
-
-    <TableRow
-        android:paddingBottom="12dip"
-        android:gravity="center_vertical"
-    >
-
-        <TextView
-            android:text="@string/call_time"
-            android:layout_marginRight="12dip"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-        />
-
-        <TextView android:id="@+id/call_time"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:layout_span="2"
-        />
-
-    </TableRow>
-
-    <TableRow android:id="@+id/call_duration_row"
-        android:paddingBottom="12dip"
-        android:gravity="center_vertical"
-        >
-
-        <TextView
-            android:text="@string/call_duration"
-            android:layout_marginRight="12dip"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-        />
-
-        <TextView android:id="@+id/call_duration"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:layout_span="2"
-        />
-
-    </TableRow>
-
-</TableLayout>
diff --git a/res/layout-finger/call_detail_list_item.xml b/res/layout-finger/call_detail_list_item.xml
new file mode 100644
index 0000000..6c61690
--- /dev/null
+++ b/res/layout-finger/call_detail_list_item.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:orientation="horizontal"
+    android:paddingLeft="9dip"
+    android:paddingRight="5dip"
+    android:gravity="center_vertical"
+>
+
+    <ImageView android:id="@+id/icon"
+        android:layout_width="32dip"
+        android:layout_height="32dip"
+        android:layout_marginRight="5dip"
+        android:gravity="center"
+        android:scaleType="centerInside"
+    />
+
+    <LinearLayout
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginLeft="5dip"
+        android:paddingTop="5dip"
+        android:paddingBottom="7dip"
+        android:orientation="vertical"
+        android:gravity="center_vertical"
+    >
+
+        <TextView android:id="@android:id/text1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+        />
+
+
+        <LinearLayout android:id="@+id/line2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+        >
+            <TextView android:id="@+id/label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="5dip"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textStyle="bold"
+            />
+        
+            <TextView android:id="@+id/number"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+            />
+        </LinearLayout>
+
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8ebdd2a..66256f0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -464,4 +464,13 @@
     
     <!-- Action string for calling back a number in the call log -->
     <string name="callBack">Call back</string>
+
+    <!-- Action string for calling a number in the call log again -->
+    <string name="callAgain">Call again</string>
+
+    <!-- Action string for returning a missed call in the call log -->
+    <string name="returnCall">Return call</string>
+
+    <!-- A nicely formatted call duration displayed when viewing call details. For example "42 mins 28 secs" -->
+    <string name="callDetailsDurationFormat"><xliff:g id="minutes" example="42">%s</xliff:g> mins <xliff:g id="seconds" example="28">%s</xliff:g> secs</string>
 </resources>
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
old mode 100755
new mode 100644
index 8b25c09..ada4778
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -26,14 +26,15 @@
 import android.net.Uri;
 import android.os.Bundle;
 import android.provider.CallLog;
-import android.provider.CallLog.Calls;
 import android.provider.Contacts;
-import android.provider.Contacts.Intents.Insert;
+import android.provider.CallLog.Calls;
 import android.provider.Contacts.People;
 import android.provider.Contacts.Phones;
+import android.provider.Contacts.Intents.Insert;
+import android.telephony.PhoneNumberUtils;
 import android.telephony.TelephonyManager;
+import android.text.TextUtils;
 import android.text.format.DateUtils;
-import android.util.Log;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -44,7 +45,7 @@
 import android.widget.TextView;
 import android.widget.Toast;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -54,14 +55,9 @@
         AdapterView.OnItemClickListener {
     private static final String TAG = "CallDetail";
 
-    private Uri mUri;
-    
-    private View mCallDetailItem;
-    
     private TextView mCallType;
     private ImageView mCallTypeIcon;
     private TextView mCallTime;
-    private View mCallDurationRow;
     private TextView mCallDuration;
 
     private String mNumber = null;
@@ -83,11 +79,16 @@
     
     static final String[] PHONES_PROJECTION = new String[] {
         Phones.PERSON_ID,
+        Phones.NAME,
+        Phones.TYPE,
+        Phones.LABEL,
+        Phones.NUMBER,
     };
-
-    static final int PERSON_ID_COLUMN_INDEX = 0;
-    
-    private static final int INVALID_TYPE = -1;
+    static final int COLUMN_INDEX_ID = 0;
+    static final int COLUMN_INDEX_NAME = 1;
+    static final int COLUMN_INDEX_TYPE = 2;
+    static final int COLUMN_INDEX_LABEL = 3;
+    static final int COLUMN_INDEX_NUMBER = 4;
 
     @Override
     protected void onCreate(Bundle icicle) {
@@ -98,13 +99,10 @@
         mInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
         mResources = getResources();
         
-        mCallDetailItem = mInflater.inflate(R.layout.call_detail_item, getListView(), false);
-        
-        mCallType = (TextView) mCallDetailItem.findViewById(R.id.call_type);
-        mCallTypeIcon = (ImageView) mCallDetailItem.findViewById(R.id.call_type_icon);
-        mCallTime = (TextView) mCallDetailItem.findViewById(R.id.call_time);
-        mCallDurationRow = mCallDetailItem.findViewById(R.id.call_duration_row);
-        mCallDuration = (TextView) mCallDetailItem.findViewById(R.id.call_duration);
+        mCallType = (TextView) findViewById(R.id.type);
+        mCallTypeIcon = (ImageView) findViewById(R.id.icon);
+        mCallTime = (TextView) findViewById(R.id.time);
+        mCallDuration = (TextView) findViewById(R.id.duration);
         
         getListView().setOnItemClickListener(this);
     }
@@ -135,33 +133,6 @@
     }
     
     /**
-     * Try a reverse-phonebook lookup to find the contact, if any, behind the given number.
-     * 
-     * @param number Phone number to perform reverse-lookup against
-     * @return Uri into {@link Contacts.People} if found, otherwise null
-     */ 
-    private Uri getPersonUri(String number) {
-        Uri personUri = null;
-        
-        // Perform a reverse-phonebook lookup to find the PERSON_ID
-        ContentResolver resolver = getContentResolver();
-        Uri phoneUri = Uri.withAppendedPath(Phones.CONTENT_FILTER_URL, Uri.encode(number));
-        Cursor phonesCursor = resolver.query(phoneUri, PHONES_PROJECTION, null, null, null);
-        try {
-            if (phonesCursor != null && phonesCursor.moveToFirst()) {
-                long personId = phonesCursor.getLong(PERSON_ID_COLUMN_INDEX);
-                personUri = ContentUris.withAppendedId(Contacts.People.CONTENT_URI, personId);
-            }
-        } finally {
-            if (phonesCursor != null) {
-                phonesCursor.close();
-            }
-        }
-        
-        return personUri;
-    }
-    
-    /**
      * Update user interface with details of given call.
      * 
      * @param callUri Uri into {@link CallLog.Calls}
@@ -180,71 +151,93 @@
                 // Pull out string in format [relative], [date]
                 CharSequence dateClause = DateUtils.formatDateRange(this, date, date,
                         DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE |
-                        DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_YEAR |
-                        DateUtils.FORMAT_ABBREV_ALL);
-                long now = System.currentTimeMillis();
-                CharSequence relativeClause = DateUtils.getRelativeTimeSpanString(date, now,
-                        DateUtils.SECOND_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE);
-                String dateString = getString(R.string.datetime_relative,
-                        dateClause, relativeClause);
-                mCallTime.setText(dateString);
+                        DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_YEAR);
+                mCallTime.setText(dateClause);
                 
                 // Set the duration
                 if (callType == Calls.MISSED_TYPE) {
-                    mCallDurationRow.setVisibility(View.GONE);
+                    mCallDuration.setVisibility(View.GONE);
                 } else {
-                    mCallDurationRow.setVisibility(View.VISIBLE);
-                    mCallDuration.setText(DateUtils.formatElapsedTime(duration));
+                    mCallDuration.setVisibility(View.VISIBLE);
+                    mCallDuration.setText(formatDuration(duration));
                 }
     
                 // Set the call type icon and caption
+                String callText = null;
                 switch (callType) {
                     case Calls.INCOMING_TYPE:
                         mCallTypeIcon.setImageResource(android.R.drawable.sym_call_incoming);
                         mCallType.setText(R.string.type_incoming);
+                        callText = getString(R.string.callBack);
                         break;
     
                     case Calls.OUTGOING_TYPE:
                         mCallTypeIcon.setImageResource(android.R.drawable.sym_call_outgoing);
                         mCallType.setText(R.string.type_outgoing);
+                        callText = getString(R.string.callAgain);
                         break;
     
                     case Calls.MISSED_TYPE:
                         mCallTypeIcon.setImageResource(android.R.drawable.sym_call_missed);
                         mCallType.setText(R.string.type_missed);
+                        callText = getString(R.string.returnCall);
                         break;
                 }
     
+                // Perform a reverse-phonebook lookup to find the PERSON_ID
+                String callLabel = null;
+                Uri personUri = null;
+                Uri phoneUri = Uri.withAppendedPath(Phones.CONTENT_FILTER_URL, Uri.encode(mNumber));
+                Cursor phonesCursor = resolver.query(phoneUri, PHONES_PROJECTION, null, null, null);
+                try {
+                    if (phonesCursor != null && phonesCursor.moveToFirst()) {
+                        long personId = phonesCursor.getLong(COLUMN_INDEX_ID);
+                        personUri = ContentUris.withAppendedId(
+                                Contacts.People.CONTENT_URI, personId);
+                        callText = getString(R.string.recentCalls_callNumber,
+                                phonesCursor.getString(COLUMN_INDEX_NAME));
+                        mNumber = phonesCursor.getString(COLUMN_INDEX_NUMBER);
+                        callLabel = Phones.getDisplayLabel(this,
+                                phonesCursor.getInt(COLUMN_INDEX_TYPE),
+                                phonesCursor.getString(COLUMN_INDEX_LABEL)).toString();
+                    } else {
+                        mNumber = PhoneNumberUtils.formatNumber(mNumber);
+                    }
+                } finally {
+                    if (phonesCursor != null) phonesCursor.close();
+                }
+
                 // Build list of various available actions
-                List<ViewEntry> actions = new LinkedList<ViewEntry>();
+                List<ViewEntry> actions = new ArrayList<ViewEntry>();
                 
                 Intent callIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
                         Uri.fromParts("tel", mNumber, null));
-                actions.add(new ViewEntry(R.drawable.ic_dialer_fork_current_call,
-                        getString(R.string.recentCalls_callNumber, mNumber), callIntent));
-    
+                ViewEntry entry = new ViewEntry(android.R.drawable.sym_action_call, callText,
+                        callIntent);
+                entry.number = mNumber;
+                entry.label = callLabel;
+                actions.add(entry);
+                
                 Intent smsIntent = new Intent(Intent.ACTION_SENDTO,
                         Uri.fromParts("sms", mNumber, null));
                 actions.add(new ViewEntry(R.drawable.sym_action_sms,
                         getString(R.string.menu_sendTextMessage), smsIntent));
-    
+                
                 // Let user view contact details if they exist, otherwise add option
                 // to create new contact from this number.
-                Uri personUri = getPersonUri(mNumber);
-                
                 if (personUri != null) {
                     Intent viewIntent = new Intent(Intent.ACTION_VIEW, personUri);
-                    actions.add(new ViewEntry(R.drawable.ic_tab_unselected_contacts,
+                    actions.add(new ViewEntry(R.drawable.sym_action_view_contact,
                             getString(R.string.menu_viewContact), viewIntent));
                 } else {
                     Intent createIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
                     createIntent.setType(People.CONTENT_ITEM_TYPE);
                     createIntent.putExtra(Insert.PHONE, mNumber);
-                    actions.add(new ViewEntry(R.drawable.ic_dialer_fork_add_call,
+                    actions.add(new ViewEntry(R.drawable.sym_action_add,
                             getString(R.string.recentCalls_addToContact), createIntent));
                 }
                 
-                ViewAdapter adapter = new ViewAdapter(this, mCallDetailItem, actions);
+                ViewAdapter adapter = new ViewAdapter(this, actions);
                 setListAdapter(adapter);
             } else {
                 // Something went wrong reading in our primary data, so we're going to
@@ -260,10 +253,25 @@
         }
     }
 
+    private String formatDuration(long elapsedSeconds) {
+        long minutes = 0;
+        long seconds = 0;
+
+        if (elapsedSeconds >= 60) {
+            minutes = elapsedSeconds / 60;
+            elapsedSeconds -= minutes * 60;
+        }
+        seconds = elapsedSeconds;
+
+        return getString(R.string.callDetailsDurationFormat, minutes, seconds);
+    }
+
     static final class ViewEntry {
         public int icon = -1;
         public String text = null;
         public Intent intent = null;
+        public String label = null;
+        public String number = null;
         
         public ViewEntry(int icon, String text, Intent intent) {
             this.icon = icon;
@@ -274,120 +282,65 @@
 
     static final class ViewAdapter extends BaseAdapter {
         
-        private final View mCallDetailItem;
         private final List<ViewEntry> mActions;
         
-        private final Context mContext;
         private final LayoutInflater mInflater;
         
-        public ViewAdapter(Context context, View callDetailItem, List<ViewEntry> actions) {
-            mCallDetailItem = callDetailItem;
+        public ViewAdapter(Context context, List<ViewEntry> actions) {
             mActions = actions;
-            
-            mContext = context;
-            mInflater = (LayoutInflater) context
-                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
+            mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         }
         
         public int getCount() {
-            // Count is actions plus two headers and call details panel.
-            return mActions.size() + 2;
+            return mActions.size();
         }
 
         public Object getItem(int position) {
-            if (position >= POS_FIRST_ITEM) {
-                return mActions.get(position - POS_FIRST_ITEM);
-            }
-            return null;
+            return mActions.get(position);
         }
 
         public long getItemId(int position) {
             return position;
         }
         
-        private static final int TYPE_HEADER = 0;
-        private static final int TYPE_CALL_DETAILS = 1;
-        private static final int TYPE_ACTION = 2;
-        
-        private static final int POS_CALL_DETAILS = 0;
-        private static final int POS_ACTIONS_HEADER = 1;
-        private static final int POS_FIRST_ITEM = 2;
-
-        public int getViewTypeCount() {
-            // Types are headers, call details panel, and actions.
-            return 3;
-        }
-        
-        public int getItemViewType(int position) {
-            switch(position) {
-                case POS_CALL_DETAILS:
-                    return TYPE_CALL_DETAILS;
-                case POS_ACTIONS_HEADER:
-                    return TYPE_HEADER;
-                default:
-                    return TYPE_ACTION;
-            }
-        }
-        
-        public boolean areAllItemsEnabled() {
-            return false;
-        }
-        
-        public boolean isEnabled(int position) {
-            return (position > POS_ACTIONS_HEADER);
-        }
-
         public View getView(int position, View convertView, ViewGroup parent) {
             // Make sure we have a valid convertView to start with
             if (convertView == null) {
-                switch(getItemViewType(position)) {
-                    case TYPE_HEADER: {
-                        convertView = mInflater.inflate(R.layout.list_separator, parent, false);
-                        break;
-                    }
-                    case TYPE_CALL_DETAILS: {
-                        convertView = mCallDetailItem;
-                        break;
-                    }
-                    case TYPE_ACTION: {
-                        convertView = mInflater.inflate(R.layout.dialpad_chooser_list_item,
-                                parent, false);
-                        break;
-                    }
-                }
+                convertView = mInflater.inflate(R.layout.call_detail_list_item, parent, false);
             }
 
-            // Now fill our known-good convertView with data
-            switch(position) {
-                case POS_CALL_DETAILS: {
-                    // Assume mCallDetailItem is already filled with correct data.
-                    break;
+            // Fill action with icon and text.
+            ViewEntry entry = mActions.get(position);
+            convertView.setTag(entry);
+            
+            ImageView icon = (ImageView) convertView.findViewById(R.id.icon);
+            TextView text = (TextView) convertView.findViewById(android.R.id.text1);
+
+            icon.setImageResource(entry.icon);
+            text.setText(entry.text);
+
+            View line2 = convertView.findViewById(R.id.line2);
+            boolean numberEmpty = TextUtils.isEmpty(entry.number);
+            boolean labelEmpty = TextUtils.isEmpty(entry.label) || numberEmpty;
+            if (labelEmpty && numberEmpty) {
+                line2.setVisibility(View.GONE);
+            } else {
+                line2.setVisibility(View.VISIBLE);
+                
+                TextView label = (TextView) convertView.findViewById(R.id.label);
+                if (labelEmpty) {
+                    label.setVisibility(View.GONE);
+                } else {
+                    label.setText(entry.label);
+                    label.setVisibility(View.VISIBLE);
                 }
-                case POS_ACTIONS_HEADER: {
-                    TextView textView = (TextView) convertView;
-                    textView.setText(mContext.getResources().getString(
-                            R.string.header_actions));
-                    break;
-                }
-                default: {
-                    // Fill action with icon and text.
-                    ViewEntry entry = (ViewEntry) getItem(position);
-                    convertView.setTag(entry);
-                    
-                    ImageView icon = (ImageView) convertView.findViewById(R.id.icon);
-                    TextView text = (TextView) convertView.findViewById(R.id.text);
-                    
-                    icon.setImageResource(entry.icon);
-                    text.setText(entry.text);
-                    
-                    break;
-                }
+
+                TextView number = (TextView) convertView.findViewById(R.id.number);
+                number.setText(entry.number);
             }
             
             return convertView;
         }
-
     }
     
     public void onItemClick(AdapterView parent, View view, int position, long id) {
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index c239104..6fad5a9 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -417,13 +417,20 @@
         // Check to see if sync is enabled
         final ContentResolver resolver = getContentResolver();
         IContentProvider provider = resolver.acquireProvider(Contacts.CONTENT_URI);
+        if (provider == null) {
+            // No contacts provider, bail.
+            finish();
+            return;
+        }
+
         try {
             ISyncAdapter sa = provider.getSyncAdapter();
             mSyncEnabled = sa != null;
         } catch (RemoteException e) {
             mSyncEnabled = false;
+        } finally {
+            resolver.releaseProvider(provider);
         }
-        resolver.releaseProvider(provider);
     }
 
     private void setEmptyText() {
diff --git a/src/com/android/contacts/RecentCallsListActivity.java b/src/com/android/contacts/RecentCallsListActivity.java
index 8298d21..8d6360b 100644
--- a/src/com/android/contacts/RecentCallsListActivity.java
+++ b/src/com/android/contacts/RecentCallsListActivity.java
@@ -37,6 +37,7 @@
 import android.provider.Contacts.People;
 import android.provider.Contacts.Phones;
 import android.provider.Contacts.Intents.Insert;
+import android.telephony.PhoneNumberUtils;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.text.format.DateUtils;
@@ -414,6 +415,9 @@
                     number = getString(R.string.private_num);
                 } else if (number.equals(mVoiceMailNumber)) {
                     number = getString(R.string.voicemail);
+                } else {
+                    // Just a raw number, format it to look pretty
+                    number = PhoneNumberUtils.formatNumber(number);
                 }
 
                 views.line1View.setText(number);