summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruabdullah <uabdullah@google.com>2018-03-30 02:23:26 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-03-30 02:23:26 +0000
commit91efee234e0b257e037fa2ba3b403602d9f8c749 (patch)
tree2b38c47cb45202e672c20fb4855c2421f3eede42
parentc3fe30d86f0ff844991de4b712b0bb3de671526a (diff)
parent050814cd80bc824f61a961f0391db2e8d55b0a15 (diff)
Merge "Update what happens when donation is rejected & use correct donation availability check"
am: 050814cd80 Change-Id: I25a5758a3cda3a5213a9825e259bcce7d8eaefef
-rw-r--r--java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java3
-rw-r--r--java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
index 096488a39..680424a78 100644
--- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
+++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
@@ -356,6 +356,9 @@ public class PhoneCallDetailsHelper
new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int button) {
+ VoicemailComponent.get(context)
+ .getVoicemailClient()
+ .setVoicemailDonationEnabled(context, details.accountHandle, false);
dialog.cancel();
recordPromoShown(context);
ratingView.setVisibility(View.GONE);
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java b/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
index f6035fd2c..60a6811ac 100644
--- a/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
+++ b/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
@@ -116,7 +116,9 @@ public class TranscriptionTaskAsync extends TranscriptionTask {
// Generate the transcript id locally if configured to do so, or if voicemail donation is
// available (because rating donating voicemails requires locally generated voicemail ids).
if (configProvider.useClientGeneratedVoicemailIds()
- || configProvider.isVoicemailDonationAvailable()) {
+ || VoicemailComponent.get(context)
+ .getVoicemailClient()
+ .isVoicemailDonationAvailable(context, phoneAccountHandle)) {
// The server currently can't handle repeated transcription id's so if we add the Uri to the
// fingerprint (which contains the voicemail id) which is different each time a voicemail is
// downloaded. If this becomes a problem then it should be possible to change the server