diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-13 17:42:27 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-05-13 17:42:56 -0700 |
commit | bad58ac9eb49521e3fe37207648d4aa95766e5eb (patch) | |
tree | e0a6652fb4d47c8483af5462e3e32016e7257d52 | |
parent | 91dc991cecfd283b2cf58dbe45dc7c6e6c58ed39 (diff) |
Don't set voicemail status message in Call Log.
This code has been unused for quite some time, as far as I can
tell.
Bug: 20433758
Change-Id: Ic9fef01954720c24d8ba6971534897a88af42a8f
-rw-r--r-- | res/layout/call_log_fragment.xml | 43 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 45 |
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(); |