diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-03-01 00:41:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-01 00:41:26 +0000 |
commit | 360c751fe5f6e75d45dfbe05facf225bfe5d2eca (patch) | |
tree | 365d08cd3bcdfa0205c136aa60777b2912bcb8e4 /java | |
parent | 5959cb2ea88aa5d95dff3cde8823775a86417757 (diff) | |
parent | 99e0aa4d3be26001182634f15327da5b0749c74c (diff) |
Merge changes I3f6a5887,Icf91804d
* changes:
Never start playing voicemails in the NUI VM tab from the speaker
Remove background of RTT chat fragment.
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayer.java | 9 | ||||
-rw-r--r-- | java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayer.java b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayer.java index 519a0dfbd..efa1060ed 100644 --- a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayer.java +++ b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayer.java @@ -17,6 +17,7 @@ package com.android.dialer.voicemail.listui; import android.content.Context; +import android.media.AudioManager; import android.media.MediaPlayer; import android.media.MediaPlayer.OnCompletionListener; import android.media.MediaPlayer.OnErrorListener; @@ -63,6 +64,7 @@ public class NewVoicemailMediaPlayer { () -> { try { mediaPlayer.setDataSource(context, uri); + setAudioManagerToNonSpeakerMode(context); } catch (IOException e) { LogUtil.i( "NewVoicemailMediaPlayer", @@ -86,6 +88,13 @@ public class NewVoicemailMediaPlayer { } } + /** We should never start playing voicemails from the speaker mode */ + private void setAudioManagerToNonSpeakerMode(Context context) { + AudioManager audioManager = context.getSystemService(AudioManager.class); + audioManager.setMode(AudioManager.STREAM_MUSIC); + audioManager.setSpeakerphoneOn(false); + } + private void verifyListenersNotNull() { Assert.isNotNull( newVoicemailMediaPlayerOnErrorListener, diff --git a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml index ef3c1f91a..d85075106 100644 --- a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml +++ b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml @@ -16,8 +16,7 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/dialer_theme_color"> + android:layout_height="match_parent"> <include layout="@layout/rtt_banner"/> |