diff options
author | uabdullah <uabdullah@google.com> | 2018-03-27 11:05:43 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-27 11:58:43 -0700 |
commit | 25879e337c8f53e011a4f004effe2b0272083b4e (patch) | |
tree | 8237bb4798c453fd1be128665b5204d8a6540da1 /java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java | |
parent | c9eb128dc6cbe1bd5d559e14324986de6871f47f (diff) |
When transcription setting is enabled, retranscribe voicemails
When transcription toggle is turned off, we delete all local transcriptions. However when it is turned back on, we should re-transcribe all those( previously transcribed, then deleted) voicemails again.
Bug: 74033229
Test: N/A
PiperOrigin-RevId: 190640972
Change-Id: Iaaf324e74c7630852daeb314f34c2c3095fe3196
Diffstat (limited to 'java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java')
-rw-r--r-- | java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java b/java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java index 8161e71f7..8fc40ee99 100644 --- a/java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java +++ b/java/com/android/voicemail/impl/transcribe/TranscriptionBackfillService.java @@ -22,6 +22,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.Uri; +import android.os.Bundle; import android.support.annotation.WorkerThread; import android.support.v4.app.JobIntentService; import android.support.v4.os.BuildCompat; @@ -66,6 +67,10 @@ public class TranscriptionBackfillService extends JobIntentService { protected void onHandleWork(Intent intent) { LogUtil.enterBlock("TranscriptionBackfillService.onHandleWork"); + Bundle bundle = intent.getExtras(); + final PhoneAccountHandle account = + (PhoneAccountHandle) bundle.get(TranscriptionService.EXTRA_ACCOUNT_HANDLE); + TranscriptionDbHelper dbHelper = new TranscriptionDbHelper(this); List<Uri> untranscribed = dbHelper.getUntranscribedVoicemails(); LogUtil.i( @@ -75,7 +80,7 @@ public class TranscriptionBackfillService extends JobIntentService { for (Uri uri : untranscribed) { ThreadUtil.postOnUiThread( () -> { - TranscriptionService.scheduleNewVoicemailTranscriptionJob(this, uri, null, false); + TranscriptionService.scheduleNewVoicemailTranscriptionJob(this, uri, account, false); }); } } |