summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authormdooley <mdooley@google.com>2017-09-27 09:53:07 -0700
committerEric Erfanian <erfanian@google.com>2017-09-28 08:33:00 -0700
commitc3c6126757e3b185587909e6ac9c7c6e897df4f9 (patch)
treed193b80bf1fa6da752ec618d60a480a4d3801c12 /java
parent126469d1020dbcb88146d595414faf9a0c4a1a28 (diff)
Adding logging for transcription polling requests
This will allow us to tune the polling rate. Bug: 66966157 Test: none PiperOrigin-RevId: 170210987 Change-Id: I6ef204acc6e0d43a3ada524511866d4a629fe1e2
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/logging/dialer_impression.proto3
-rw-r--r--java/com/android/voicemail/impl/transcribe/TranscriptionTask.java2
-rw-r--r--java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java2
3 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/dialer/logging/dialer_impression.proto b/java/com/android/dialer/logging/dialer_impression.proto
index d5f1963d2..fe1c5e9ba 100644
--- a/java/com/android/dialer/logging/dialer_impression.proto
+++ b/java/com/android/dialer/logging/dialer_impression.proto
@@ -551,5 +551,8 @@ message DialerImpression {
LIGHTBRINGER_NON_CONTACT_UPGRADE_REQUESTED = 1281;
LIGHTBRINGER_NON_CONTACT_VIDEO_REQUESTED_FROM_CALL_LOG =
1282; // Including call history
+
+ // More voicemail transcription impressions
+ VVM_TRANSCRIPTION_POLL_REQUEST = 1283;
}
}
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionTask.java b/java/com/android/voicemail/impl/transcribe/TranscriptionTask.java
index 60b97dad5..a93c65151 100644
--- a/java/com/android/voicemail/impl/transcribe/TranscriptionTask.java
+++ b/java/com/android/voicemail/impl/transcribe/TranscriptionTask.java
@@ -57,7 +57,7 @@ import java.io.InputStream;
public abstract class TranscriptionTask implements Runnable {
private static final String TAG = "TranscriptionTask";
- private final Context context;
+ protected final Context context;
private final JobCallback callback;
private final JobWorkItem workItem;
private final TranscriptionClientFactory clientFactory;
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java b/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
index 930d7f113..e75728014 100644
--- a/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
+++ b/java/com/android/voicemail/impl/transcribe/TranscriptionTaskAsync.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.util.Pair;
import com.android.dialer.common.Assert;
import com.android.dialer.logging.DialerImpression;
+import com.android.dialer.logging.Logger;
import com.android.voicemail.impl.VvmLog;
import com.android.voicemail.impl.transcribe.TranscriptionService.JobCallback;
import com.android.voicemail.impl.transcribe.grpc.GetTranscriptResponseAsync;
@@ -94,6 +95,7 @@ public class TranscriptionTaskAsync extends TranscriptionTask {
VvmLog.i(TAG, "pollForTranscription, cancelled.");
return new Pair<>(null, TranscriptionStatus.FAILED_NO_RETRY);
}
+ Logger.get(context).logImpression(DialerImpression.Type.VVM_TRANSCRIPTION_POLL_REQUEST);
GetTranscriptResponseAsync response =
(GetTranscriptResponseAsync)
sendRequest((client) -> client.sendGetTranscriptRequest(request));