summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/layout/call_log_fragment.xml43
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java45
2 files changed, 12 insertions, 76 deletions
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index a5a307207..68e306074 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.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>
+ android:layout_height="match_parent"
+ layout="@layout/empty_list_view"
+ android:visibility="gone" />
-</LinearLayout>
+</FrameLayout>
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 4948176c1..e8ed17ec6 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -93,10 +93,7 @@ public class CallLogFragment extends Fragment
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 @@ public class CallLogFragment extends Fragment
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 @@ public class CallLogFragment extends Fragment
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 @@ public class CallLogFragment extends Fragment
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();