diff options
author | Muhammed Siju <msiju@codeaurora.org> | 2021-04-09 19:52:32 +0530 |
---|---|---|
committer | Muhammed Siju <msiju@codeaurora.org> | 2021-04-16 17:45:38 +0000 |
commit | 3d24e82f45a62c27c1f27228aced6e2cb9afd49e (patch) | |
tree | 3be1dc4548315ad9f733f350155a7244f7c6cc06 /telecomm/java | |
parent | a06a499f71459b8f3457d2f91e4481760ee61275 (diff) |
IMS: Fix issue with answering call for some 3rd party apps
Some 3rd party call manager apps, implement only onAnswer()
method for answering calls. So make sure onAnswer() is invoked
when answer call is requested without videostate.
Change-Id: I033279e4bd17fa291ca2cb8f149e33264446d24a
CRs-Fixed: 2921144
Diffstat (limited to 'telecomm/java')
-rwxr-xr-x | telecomm/java/android/telecom/ConnectionService.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 3efab17874e9..e7d8db0c7cd4 100755 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -2106,25 +2106,23 @@ public abstract class ConnectionService extends Service { findConnectionForAction(callId, "abort").onAbort(); } - private void answerVideo(String callId, int videoState) { + /** {@hide} */ + protected void answerVideo(String callId, int videoState) { Log.i(this, "answerVideo %s", callId); - doAnswer(callId, videoState); + if (mConnectionById.containsKey(callId)) { + findConnectionForAction(callId, "answer").onAnswer(videoState); + } else { + findConferenceForAction(callId, "answer").onAnswer(videoState); + } } - private void answer(String callId) { + /** {@hide} */ + protected void answer(String callId) { Log.i(this, "answer %s", callId); - doAnswer(callId, VideoProfile.STATE_AUDIO_ONLY); - } - - /** - * Access is public because protected access is not allowed. - * @hide - */ - public void doAnswer(String callId, int videoState) { if (mConnectionById.containsKey(callId)) { - findConnectionForAction(callId, "answer").onAnswer(videoState); + findConnectionForAction(callId, "answer").onAnswer(); } else { - findConferenceForAction(callId, "answer").onAnswer(videoState); + findConferenceForAction(callId, "answer").onAnswer(); } } |