First cut voicemail source status message ui.

The UI right now is very basic.

Also renamed Message to StatusMessage to avoid conflict with
android.os.Message used in the call fragment code.

TODO:
- make the UI look nicer.
- show more than one messages
- make db call asynchronously

Change-Id: I10c1be8a37990104b5fe428c61964e7a78b7fd46
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index 2a27fcd..573969b 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -14,21 +14,29 @@
      limitations under the License.
 -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:orientation="vertical"
 >
-    <ListView android:id="@android:id/list"
+    <include layout="@layout/call_log_voicemail_status"/>
+    <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:scrollbarStyle="outsideOverlay"
-    />
+        android:layout_height="wrap_content"
+    >
+        <ListView android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:scrollbarStyle="outsideOverlay"
+        />
 
-    <TextView android:id="@android:id/empty"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:text="@string/recentCalls_empty"
-        android:gravity="center"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-    />
-</FrameLayout>
+        <TextView android:id="@android:id/empty"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:text="@string/recentCalls_empty"
+            android:gravity="center"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+        />
+    </FrameLayout>
+</LinearLayout>
+
diff --git a/res/layout/call_log_voicemail_status.xml b/res/layout/call_log_voicemail_status.xml
new file mode 100644
index 0000000..1abe998
--- /dev/null
+++ b/res/layout/call_log_voicemail_status.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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:id="@+id/voicemail_status"
+    android:layout_width="match_parent"
+    android:layout_height="?attr/call_log_voicemail_status_height"
+    android:layout_alignParentLeft="true"
+    android:layout_alignParentBottom="true"
+    android:background="?attr/call_log_voicemail_status_background_color"
+    android:baselineAligned="false">
+    <TextView
+        android:id="@+id/voicemail_status_message"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:textColor="?attr/call_log_voicemail_status_text_color"
+        android:layout_gravity="left"
+        android:layout_weight="5"/>
+    <View android:id="@+id/divider"
+        android:layout_width="1px"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="5dip"
+        android:layout_marginBottom="5dip"
+        android:layout_marginLeft="11dip"
+        android:background="@drawable/divider_vertical_dark"/>
+    <TextView
+        android:id="@+id/voicemail_status_action"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="right"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:textColor="?attr/call_log_voicemail_status_text_color"
+        android:gravity="right"
+        android:layout_alignParentRight="true"
+        android:clickable="true"
+    />
+</LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4638b2e..43ea301 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -49,6 +49,10 @@
         <item name="call_log_primary_background_color">#000000</item>
         <item name="call_log_secondary_text_color">#FFFFFF</item>
         <item name="call_log_secondary_background_color">#333333</item>
+        <!-- VoicemailStatus -->
+        <item name="call_log_voicemail_status_height">40dip</item>
+        <item name="call_log_voicemail_status_background_color">#FFFFE0</item>
+        <item name="call_log_voicemail_status_text_color">#000000</item>
     </style>
 
     <style name="CallDetailActivityTheme" parent="android:Theme.Holo">
@@ -161,6 +165,12 @@
         <attr name="call_log_list_header_background" format="reference" />
     </declare-styleable>
 
+    <declare-styleable name="VoicemailStatus">
+        <attr name="call_log_voicemail_status_height" format="dimension" />
+        <attr name="call_log_voicemail_status_background_color" format="color" />
+        <attr name="call_log_voicemail_status_text_color" format="color" />
+    </declare-styleable>
+
     <style name="PeopleTheme" parent="android:Theme.Holo.Light.SplitActionBarWhenNarrow">
         <item name="list_item_height">?android:attr/listPreferredItemHeight</item>
         <item name="activated_background">@drawable/list_item_activated_background</item>