summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java')
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java35
1 files changed, 17 insertions, 18 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
index 3f2de7d00..66a6fea7c 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
@@ -379,8 +379,6 @@ public final class NewVoicemailMediaPlayerView extends LinearLayout {
private void sendIntentToDownloadVoicemail(Uri uri) {
LogUtil.i("NewVoicemailMediaPlayer.sendIntentToDownloadVoicemail", "uri:%s", uri.toString());
- // Send voicemail fetch request.
- Intent intent = new Intent(VoicemailContract.ACTION_FETCH_VOICEMAIL, uri);
Worker<Pair<Context, Uri>, Pair<String, Uri>> getVoicemailSourcePackage =
this::queryVoicemailSourcePackage;
@@ -399,7 +397,7 @@ public final class NewVoicemailMediaPlayerView extends LinearLayout {
Uri uri = booleanUriPair.second;
LogUtil.i(
"NewVoicemailMediaPlayer.sendIntent",
- "srcPkg:%s, uri:%%s",
+ "srcPkg:%s, uri:%s",
sourcePackage,
String.valueOf(uri));
Intent intent = new Intent(VoicemailContract.ACTION_FETCH_VOICEMAIL, uri);
@@ -465,23 +463,11 @@ public final class NewVoicemailMediaPlayerView extends LinearLayout {
"NewVoicemailMediaPlayer.phoneButtonListener",
"speaker request for voicemailUri: %s",
voicemailUri.toString());
- }
- };
-
- private final View.OnClickListener deleteButtonListener =
- new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- LogUtil.i(
- "NewVoicemailMediaPlayer.deleteButtonListener",
- "delete voicemailUri %s",
- voicemailUri.toString());
- // TODO(uabdullah): This will be removed in cl/177404259. It only sets the has_content to
- // 0, to allow the annotated call log to change, and refresh the fragment. This is used to
- // demo and test the downloading of voicemails from the server.
ContentValues contentValues = new ContentValues();
contentValues.put("has_content", 0);
-
+ // TODO(uabdullah): It only sets the has_content to 0, to allow the annotated call log to
+ // change, and refresh the fragment. This is used to demo and test the downloading of
+ // voicemails from the server. This will be removed once we implement this listener.
try {
getContext().getContentResolver().update(voicemailUri, contentValues, "type = 4", null);
} catch (Exception e) {
@@ -494,6 +480,19 @@ public final class NewVoicemailMediaPlayerView extends LinearLayout {
}
};
+ private final View.OnClickListener deleteButtonListener =
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ LogUtil.i(
+ "NewVoicemailMediaPlayer.deleteButtonListener",
+ "delete voicemailUri %s",
+ String.valueOf(voicemailUri));
+ newVoicemailViewHolderListener.deleteViewHolder(
+ getContext(), fragmentManager, newVoicemailViewHolder, voicemailUri);
+ }
+ };
+
/**
* This is only called to update the media player view of the seekbar, and the duration and the
* play button. For constant updates the adapter should seek track. This is the state when a