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/TranscriptionDbHelper.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/TranscriptionDbHelper.java')
-rw-r--r-- | java/com/android/voicemail/impl/transcribe/TranscriptionDbHelper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionDbHelper.java b/java/com/android/voicemail/impl/transcribe/TranscriptionDbHelper.java index 24c07cc37..6ffb8485d 100644 --- a/java/com/android/voicemail/impl/transcribe/TranscriptionDbHelper.java +++ b/java/com/android/voicemail/impl/transcribe/TranscriptionDbHelper.java @@ -87,7 +87,14 @@ public class TranscriptionDbHelper { Assert.isWorkerThread(); List<Uri> untranscribed = new ArrayList<>(); String whereClause = - Voicemails.TRANSCRIPTION + " is NULL AND " + VoicemailCompat.TRANSCRIPTION_STATE + "=?"; + "(" + + Voicemails.TRANSCRIPTION + + " is NULL OR " + + Voicemails.TRANSCRIPTION + + " = '')" + + " AND " + + VoicemailCompat.TRANSCRIPTION_STATE + + "=?"; String[] whereArgs = {String.valueOf(VoicemailCompat.TRANSCRIPTION_NOT_STARTED)}; try (Cursor cursor = contentResolver.query(uri, PROJECTION, whereClause, whereArgs, null)) { if (cursor == null) { |