diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-11-29 17:32:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-11-29 17:32:50 +0000 |
commit | 9c93611edcb369f4e4ac7cff5c261bd1da65c347 (patch) | |
tree | c59375133ee2f7236c17758706e88a492db81259 /java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java | |
parent | 5b6d823a45fe56cf9c36e5b00908831049c1d827 (diff) | |
parent | 70fedf8d6caee1177ee891bbfff404dc48867c16 (diff) |
Merge "Adding transcription rating feedback"
Diffstat (limited to 'java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java')
-rw-r--r-- | java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java b/java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java index b18d95627..381cb3268 100644 --- a/java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java +++ b/java/com/android/voicemail/impl/transcribe/grpc/TranscriptionClient.java @@ -17,6 +17,7 @@ package com.android.voicemail.impl.transcribe.grpc; import android.support.annotation.WorkerThread; import com.google.internal.communications.voicemailtranscription.v1.GetTranscriptRequest; +import com.google.internal.communications.voicemailtranscription.v1.SendTranscriptionFeedbackRequest; import com.google.internal.communications.voicemailtranscription.v1.TranscribeVoicemailAsyncRequest; import com.google.internal.communications.voicemailtranscription.v1.TranscribeVoicemailRequest; import com.google.internal.communications.voicemailtranscription.v1.VoicemailTranscriptionServiceGrpc; @@ -58,4 +59,14 @@ public class TranscriptionClient { return new GetTranscriptResponseAsync(e.getStatus()); } } + + @WorkerThread + public TranscriptionFeedbackResponseAsync sendTranscriptFeedbackRequest( + SendTranscriptionFeedbackRequest request) { + try { + return new TranscriptionFeedbackResponseAsync(stub.sendTranscriptionFeedback(request)); + } catch (StatusRuntimeException e) { + return new TranscriptionFeedbackResponseAsync(e.getStatus()); + } + } } |