From 12bccb9d6fa9f5e1daff8d51a0527dbdfb8606bd Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Tue, 5 Aug 2014 23:43:31 -0700 Subject: Remove hardcoded audio route in video provider. The video provider always calls exitVideo() and as a result always sets the audio mode to EARPIECE when any call starts, negating any automatic setting done by telecomm (like bluetooth). This change has three items: 1. Only set the audio mode if we are exiting a previously entered video call. 2. When setting audio on exit, set it to the mode that was previously saved when the video call was entered. 3. Convert usages of the private AudioMode to the public CallStateAudio. Change-Id: I484ea8fadc9b7cf43692b517c97f906918fc49f8 --- .../com/android/incallui/VideoCallPresenter.java | 30 ++++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 1d3e62b5b..77aa4ac0c 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -16,20 +16,19 @@ package com.android.incallui; -import com.google.common.base.Preconditions; -import com.android.incallui.InCallVideoCallListenerNotifier.SurfaceChangeListener; -import com.android.incallui.InCallVideoCallListenerNotifier.VideoEventListener; -import com.android.incallui.InCallPresenter.InCallDetailsListener; -import com.android.incallui.InCallPresenter.InCallOrientationListener; -import com.android.incallui.InCallPresenter.InCallStateListener; -import com.android.incallui.InCallPresenter.IncomingCallListener; - import android.content.Context; import android.content.res.Configuration; +import android.telecomm.CallAudioState; import android.telecomm.InCallService.VideoCall; import android.view.Surface; -import com.android.services.telephony.common.AudioMode; +import com.android.incallui.InCallPresenter.InCallDetailsListener; +import com.android.incallui.InCallPresenter.InCallOrientationListener; +import com.android.incallui.InCallPresenter.InCallStateListener; +import com.android.incallui.InCallPresenter.IncomingCallListener; +import com.android.incallui.InCallVideoCallListenerNotifier.SurfaceChangeListener; +import com.android.incallui.InCallVideoCallListenerNotifier.VideoEventListener; +import com.google.common.base.Preconditions; import java.util.Objects; @@ -141,6 +140,11 @@ public class VideoCallPresenter extends Presenter