am e5618db1: am e35ce7c7: am 46b5395d: Merge "Don\'t set voicemail status message in Call Log." into mnc-dev

* commit 'e5618db1787ced7494ecc6d24e0058703c183692':
  Don't set voicemail status message in Call Log.
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index a5a3072..68e3060 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -15,42 +15,23 @@
 -->
 
 <!-- Layout parameters are set programmatically. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:divider="?android:attr/dividerHorizontal"
-    android:showDividers="end"
     android:background="@color/background_dialer_call_log">
 
-    <FrameLayout
-        android:id="@+id/voicemail_status"
+    <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:visibility="gone">
+        android:layout_height="match_parent"
+        android:background="@color/background_dialer_call_log"
+        android:paddingStart="@dimen/call_log_horizontal_margin"
+        android:paddingEnd="@dimen/call_log_horizontal_margin" />
 
-        <include layout="@layout/call_log_voicemail_status" />
-
-    </FrameLayout>
-
-    <FrameLayout
+    <include
+        android:id="@+id/empty_list_view"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        layout="@layout/empty_list_view"
+        android:visibility="gone" />
 
-        <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@color/background_dialer_call_log"
-            android:paddingStart="@dimen/call_log_horizontal_margin"
-            android:paddingEnd="@dimen/call_log_horizontal_margin" />
-
-        <include
-            android:id="@+id/empty_list_view"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            layout="@layout/empty_list_view"
-            android:visibility="gone" />
-
-    </FrameLayout>
-
-</LinearLayout>
+</FrameLayout>
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 4948176..e8ed17e 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -93,10 +93,7 @@
     private boolean mVoicemailSourcesAvailable = false;
 
     private VoicemailStatusHelper mVoicemailStatusHelper;
-    private View mStatusMessageView;
     private View mEmptyListView;
-    private TextView mStatusMessageText;
-    private TextView mStatusMessageAction;
     private KeyguardManager mKeyguardManager;
 
     private boolean mEmptyLoaderRunning;
@@ -249,16 +246,6 @@
         if (activity == null || activity.isFinishing()) {
             return;
         }
-        updateVoicemailStatusMessage(statusCursor);
-
-        // If there are any changes to the presence of active voicemail services, invalidate the
-        // options menu so that it will be updated.
-        boolean hasActiveVoicemailSources =
-                mVoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor) != 0;
-        if (mVoicemailSourcesAvailable != hasActiveVoicemailSources) {
-            mVoicemailSourcesAvailable = hasActiveVoicemailSources;
-            activity.invalidateOptionsMenu();
-        }
 
         mVoicemailStatusFetched = true;
         destroyEmptyLoaderIfAllDataFetched();
@@ -291,9 +278,6 @@
         mRecyclerView.setAdapter(mAdapter);
 
         mVoicemailStatusHelper = new VoicemailStatusHelperImpl();
-        mStatusMessageView = view.findViewById(R.id.voicemail_status);
-        mStatusMessageText = (TextView) view.findViewById(R.id.voicemail_status_message);
-        mStatusMessageAction = (TextView) view.findViewById(R.id.voicemail_status_action);
         return view;
     }
 
@@ -335,35 +319,6 @@
         refreshData();
     }
 
-    private void updateVoicemailStatusMessage(Cursor statusCursor) {
-        List<StatusMessage> messages = mVoicemailStatusHelper.getStatusMessages(statusCursor);
-        if (messages.size() == 0) {
-            mStatusMessageView.setVisibility(View.GONE);
-        } else {
-            mStatusMessageView.setVisibility(View.VISIBLE);
-            // TODO: Change the code to show all messages. For now just pick the first message.
-            final StatusMessage message = messages.get(0);
-            if (message.showInCallLog()) {
-                mStatusMessageText.setText(message.callLogMessageId);
-            }
-            if (message.actionMessageId != -1) {
-                mStatusMessageAction.setText(message.actionMessageId);
-            }
-            if (message.actionUri != null) {
-                mStatusMessageAction.setVisibility(View.VISIBLE);
-                mStatusMessageAction.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        getActivity().startActivity(
-                                new Intent(Intent.ACTION_VIEW, message.actionUri));
-                    }
-                });
-            } else {
-                mStatusMessageAction.setVisibility(View.GONE);
-            }
-        }
-    }
-
     @Override
     public void onPause() {
         super.onPause();