Skip to content
Snippets Groups Projects
Commit 15fdf0a8 authored by Aline Bonnet's avatar Aline Bonnet
Browse files

conversation: fix the call indication


When we receive a incoming call, the call indication is displayed on
the conversation screen before the call transaction is completed.
This commit adds a check on the call status to fix this problem.

Change-Id: If3cec95d3ac9670b8b2102ffa4c9bde68733846a
Reviewed-by: default avatarHadrien De Sousa <hadrien.desousa@savoirfairelinux.com>
Tuleap: #1565
parent b4d2f33d
Branches
Tags
No related merge requests found
...@@ -31,6 +31,7 @@ import cx.ring.model.Conference; ...@@ -31,6 +31,7 @@ import cx.ring.model.Conference;
import cx.ring.model.Conversation; import cx.ring.model.Conversation;
import cx.ring.model.Phone; import cx.ring.model.Phone;
import cx.ring.model.ServiceEvent; import cx.ring.model.ServiceEvent;
import cx.ring.model.SipCall;
import cx.ring.model.Uri; import cx.ring.model.Uri;
import cx.ring.mvp.RootPresenter; import cx.ring.mvp.RootPresenter;
import cx.ring.services.AccountService; import cx.ring.services.AccountService;
...@@ -222,7 +223,9 @@ public class ConversationPresenter extends RootPresenter<ConversationView> imple ...@@ -222,7 +223,9 @@ public class ConversationPresenter extends RootPresenter<ConversationView> imple
getView().displayContactName(mConversation.getContact().getDisplayName()); getView().displayContactName(mConversation.getContact().getDisplayName());
} }
getView().displayOnGoingCallPane(mConversation.getCurrentCall() == null); getView().displayOnGoingCallPane(mConversation.getCurrentCall() == null ||
(mConversation.getCurrentCall().getState() != SipCall.State.RINGING &&
mConversation.getCurrentCall().getState() != SipCall.State.CURRENT));
if (mConversation.getContact().getPhones().size() > 1) { if (mConversation.getContact().getPhones().size() > 1) {
for (Phone phone : mConversation.getContact().getPhones()) { for (Phone phone : mConversation.getContact().getPhones()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment