Changing the point where the call state is set.
The reason speakerphone was not working while the call was dialing was
because the call went from state DIALING -> DIALING, which was not seen
as a state change, which meant that the call was not updated in the audio
manager, resulting there being no audio focus.
Note this is related to changes made in CL/518284.
Bug: 16978516
Change-Id: I7b2be0ec21c484f6fbd767055e5e9afefbb526e2
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index e75a9a1..c2af444 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -123,8 +123,9 @@
}
@Override
- public void onSuccessfulOutgoingCall(Call call) {
+ public void onSuccessfulOutgoingCall(Call call, CallState callState) {
Log.v(this, "onSuccessfulOutgoingCall, %s", call);
+ setCallState(call, callState);
if (mCalls.contains(call)) {
// The call's ConnectionService has been updated.
for (CallsManagerListener listener : mListeners) {
@@ -161,6 +162,7 @@
@Override
public void onFailedIncomingCall(Call call) {
+ setCallState(call, CallState.DISCONNECTED);
call.removeListener(this);
}