Fix issue that music popped up from speaker during ringing call
Pre-condition: Music is played through speaker.
When there is a ringing call, if user presses volume key, music gets
played through speaker. This is caused by NO_MORE_RINGING_CALLS message
is sent to CallAudioModeStateMachine resulting in loss of audio focus.
Fix issue by not sending the message if there is an existing call.
Bug: 31231586
Change-Id: I8317781c8db02baafbd10321b19783cff646ec51
diff --git a/src/com/android/server/telecom/CallAudioManager.java b/src/com/android/server/telecom/CallAudioManager.java
index 4a35acc..e50fd21 100644
--- a/src/com/android/server/telecom/CallAudioManager.java
+++ b/src/com/android/server/telecom/CallAudioManager.java
@@ -414,12 +414,8 @@
call.silence();
}
- mRingingCalls.clear();
mRinger.stopRinging();
mRinger.stopCallWaiting();
- mCallAudioModeStateMachine.sendMessageWithArgs(
- CallAudioModeStateMachine.NO_MORE_RINGING_CALLS,
- makeArgsForModeStateMachine());
}
@VisibleForTesting