diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-14 17:57:32 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-05-14 18:27:04 -0700 |
commit | 6ed11569195e1a267aacd14b5464f73f3578f738 (patch) | |
tree | d3ada29124323a3e13b53c8c38e57da5f6da5427 /src/com/android/dialer/CallDetailActivity.java | |
parent | 4937a7223c63c7bbdfcc8463195d315cfdbb1aba (diff) |
Remove VM StatusMessage code from Call Details.
This isn't used in any particular case right now.
Remove some unused layouts too.
Bug: 21170557
Change-Id: Ie21264d7059e73c905b2807b993b95c91a0dd3ec
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index f5802d0e2..a509c7fa1 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -121,14 +121,7 @@ public class CallDetailActivity extends Activity { /* package */ Resources mResources; /** Helper to load contact photos. */ private ContactPhotoManager mContactPhotoManager; - /** Helper to make async queries to content resolver. */ - private CallDetailActivityQueryHandler mAsyncQueryHandler; - /** Helper to get voicemail status messages. */ - private VoicemailStatusHelper mVoicemailStatusHelper; // Views related to voicemail status message. - private View mStatusMessageView; - private TextView mStatusMessageText; - private TextView mStatusMessageAction; private TextView mVoicemailTranscription; private LinearLayout mVoicemailHeader; @@ -182,8 +175,6 @@ public class CallDetailActivity extends Activity { mCallTypeHelper = new CallTypeHelper(getResources()); mPhoneNumberHelper = new PhoneNumberDisplayHelper(this, mResources); - mVoicemailStatusHelper = new VoicemailStatusHelperImpl(); - mAsyncQueryHandler = new CallDetailActivityQueryHandler(this); mVoicemailUri = getIntent().getParcelableExtra(EXTRA_VOICEMAIL_URI); @@ -225,11 +216,6 @@ public class CallDetailActivity extends Activity { mVoicemailHeader = (LinearLayout) inflater.inflate(R.layout.call_details_voicemail_header, null); View voicemailContainer = mVoicemailHeader.findViewById(R.id.voicemail_container); - mStatusMessageView = mVoicemailHeader.findViewById(R.id.voicemail_status); - mStatusMessageText = - (TextView) mVoicemailHeader.findViewById(R.id.voicemail_status_message); - mStatusMessageAction = - (TextView) mVoicemailHeader.findViewById(R.id.voicemail_status_action); mVoicemailTranscription = ( TextView) mVoicemailHeader.findViewById(R.id.voicemail_transcription); ListView historyList = (ListView) findViewById(R.id.history); @@ -256,7 +242,6 @@ public class CallDetailActivity extends Activity { } voicemailContainer.setVisibility(View.VISIBLE); - mAsyncQueryHandler.startVoicemailStatusQuery(mVoicemailUri); markVoicemailAsRead(mVoicemailUri); } } @@ -592,50 +577,6 @@ public class CallDetailActivity extends Activity { } } - protected void updateVoicemailStatusMessage(Cursor statusCursor) { - if (statusCursor == null) { - mStatusMessageView.setVisibility(View.GONE); - return; - } - final StatusMessage message = getStatusMessage(statusCursor); - if (message == null || !message.showInCallDetails()) { - mStatusMessageView.setVisibility(View.GONE); - return; - } - - mStatusMessageView.setVisibility(View.VISIBLE); - mStatusMessageText.setText(message.callDetailsMessageId); - if (message.actionMessageId != -1) { - mStatusMessageAction.setText(message.actionMessageId); - } - if (message.actionUri != null) { - mStatusMessageAction.setClickable(true); - mStatusMessageAction.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - DialerUtils.startActivityWithErrorToast(CallDetailActivity.this, - new Intent(Intent.ACTION_VIEW, message.actionUri)); - } - }); - } else { - mStatusMessageAction.setClickable(false); - } - } - - private StatusMessage getStatusMessage(Cursor statusCursor) { - List<StatusMessage> messages = mVoicemailStatusHelper.getStatusMessages(statusCursor); - if (messages.size() == 0) { - return null; - } - // There can only be a single status message per source package, so num of messages can - // at most be 1. - if (messages.size() > 1) { - Log.w(TAG, String.format("Expected 1, found (%d) num of status messages." + - " Will use the first one.", messages.size())); - } - return messages.get(0); - } - @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.call_details_options, menu); |