summaryrefslogtreecommitdiff
path: root/java/com/android
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-09-20 22:25:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-09-20 22:25:17 +0000
commitda6e1f120189c89059b06afc989e5178a6b8622f (patch)
tree0431e48715d881055d71885356cd9c63a01b4762 /java/com/android
parentaa8dee513f7b48425fa125c218e76f5fcc5c2430 (diff)
parent95ef73e0b7ff185294c46a98acad9b5ba68f2984 (diff)
Merge changes I0d53a576,I0baf31c3,I297b945c,I63c9165f
* changes: Forgot to keep this file in sync with //google/internal/communications/voicemailtranscription/v1/voicemail_transcription.proto Fixed issue where all contacts weren't beign shown. Add more logging when video surface texture is destroyed. Don't truncate long voicemail transcriptions
Diffstat (limited to 'java/com/android')
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_list_item.xml6
-rw-r--r--java/com/android/dialer/searchfragment/list/SearchCursorManager.java6
-rw-r--r--java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java8
-rw-r--r--java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto22
4 files changed, 31 insertions, 11 deletions
diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item.xml b/java/com/android/dialer/app/res/layout/call_log_list_item.xml
index 63f14db9d..39dcbacf5 100644
--- a/java/com/android/dialer/app/res/layout/call_log_list_item.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_list_item.xml
@@ -63,6 +63,7 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_gravity="top"
>
<com.android.dialer.app.calllog.DialerQuickContactBadge
@@ -71,7 +72,6 @@
android:layout_height="@dimen/contact_photo_size"
android:paddingTop="2dp"
android:nextFocusRight="@id/primary_action_view"
- android:layout_gravity="top"
android:focusable="true"/>
<ImageView
@@ -162,9 +162,7 @@
android:layout_height="wrap_content"
android:textColor="@color/call_log_voicemail_transcript_color"
android:textSize="@dimen/call_log_voicemail_transcription_text_size"
- android:textIsSelectable="true"
- android:ellipsize="marquee"
- android:maxLines="10"/>
+ android:textIsSelectable="true"/>
<TextView
android:id="@+id/voicemail_transcription_branding"
diff --git a/java/com/android/dialer/searchfragment/list/SearchCursorManager.java b/java/com/android/dialer/searchfragment/list/SearchCursorManager.java
index 95bede001..3704e817d 100644
--- a/java/com/android/dialer/searchfragment/list/SearchCursorManager.java
+++ b/java/com/android/dialer/searchfragment/list/SearchCursorManager.java
@@ -96,7 +96,7 @@ public final class SearchCursorManager {
contactsCursor.close();
}
- if (cursor != null && cursor.getCount() > 0) {
+ if (cursor != null) {
contactsCursor = cursor;
} else {
contactsCursor = null;
@@ -114,7 +114,7 @@ public final class SearchCursorManager {
nearbyPlacesCursor.close();
}
- if (cursor != null && cursor.getCount() > 0) {
+ if (cursor != null) {
nearbyPlacesCursor = cursor;
} else {
nearbyPlacesCursor = null;
@@ -132,7 +132,7 @@ public final class SearchCursorManager {
corpDirectoryCursor.close();
}
- if (cursor != null && cursor.getCount() > 0) {
+ if (cursor != null) {
corpDirectoryCursor = cursor;
} else {
corpDirectoryCursor = null;
diff --git a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java
index 6ce564a87..fa757247d 100644
--- a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java
+++ b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java
@@ -220,10 +220,10 @@ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture {
public boolean onSurfaceTextureDestroyed(SurfaceTexture destroyedSurfaceTexture) {
LogUtil.i(
"SurfaceTextureListener.onSurfaceTextureDestroyed",
- "destroyedSurfaceTexture: "
- + destroyedSurfaceTexture
- + " "
- + VideoSurfaceTextureImpl.this.toString());
+ "destroyedSurfaceTexture: %s, %s, isDoneWithSurface: %b",
+ destroyedSurfaceTexture,
+ VideoSurfaceTextureImpl.this.toString(),
+ isDoneWithSurface);
if (delegate != null) {
delegate.onSurfaceDestroyed(VideoSurfaceTextureImpl.this);
} else {
diff --git a/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto b/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
index a2064d193..697e9e337 100644
--- a/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
+++ b/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
@@ -56,6 +56,18 @@ enum TranscriptionStatus {
FAILED_NO_SPEECH_DETECTED = 7;
}
+// Enum that specifies the user's consent to donate a specific voicemail.
+enum DonationPreference {
+ // Default but invalid value.
+ USER_PREFERENCE_UNSPECIFIED = 0;
+
+ // User does not consent to donating this voicemail.
+ DO_NOT_DONATE = 1;
+
+ // User consents to donating this voicemail.
+ DONATE = 2;
+}
+
// Request for synchronous voicemail transcription.
message TranscribeVoicemailRequest {
// Voicemail audio file containing the raw bytes we receive from the carrier.
@@ -78,6 +90,16 @@ message TranscribeVoicemailAsyncRequest {
// Audio format of the voicemail file.
optional AudioFormat audio_format = 2;
+
+ // The client may provide their own unique ID for this transcription. It
+ // should be globally unique across all voicemails from all users.
+ // If the given transcription_id is not unique, an ALREADY_EXISTS (409) error
+ // will be returned.
+ // If no transcription_id is provided, one will be generated by the server.
+ optional string transcription_id = 3;
+
+ // User's donation preference.
+ optional DonationPreference donation_preference = 4;
}
// Response for asynchronous voicemail transcription containing information