Commit bdc2c97d authored by Adrien Béraud's avatar Adrien Béraud

call: fix hangup, open contact

Change-Id: I58aaa06ddc27a538517efe1f6720c5189950853d
parent 42bb180e
......@@ -1250,7 +1250,7 @@ public class CallFragment extends BaseSupportFragment<CallPresenter> implements
@Override
public void goToContact(String accountId, Contact contact) {
startActivity(new Intent(Intent.ACTION_VIEW, android.net.Uri.withAppendedPath(android.net.Uri.withAppendedPath(ContentUriHandler.CONTACT_CONTENT_URI, accountId), contact.getPrimaryNumber()))
startActivity(new Intent(Intent.ACTION_VIEW, ConversationPath.toUri(accountId, contact.getUri()))
.setClass(requireContext(), ContactDetailsActivity.class));
}
......
......@@ -717,9 +717,10 @@ public class CallPresenter extends RootPresenter<CallView> {
}
public void hangupParticipant(Conference.ParticipantInfo info) {
//mCallService.
if (info.call != null)
mCallService.hangUp(info.call.getDaemonIdString());
else
mCallService.hangupParticipant(mConference.getId(), info.contact.getPrimaryNumber());
}
public void muteParticipant(Conference.ParticipantInfo info, boolean mute) {
......@@ -727,7 +728,8 @@ public class CallPresenter extends RootPresenter<CallView> {
}
public void openParticipantContact(Conference.ParticipantInfo info) {
getView().goToContact(mConference.getFirstCall().getAccount(), info.contact);
Call call = info.call == null ? mConference.getFirstCall() : info.call;
getView().goToContact(call.getAccount(), info.contact);
}
public void stopCapture() {
......
......@@ -302,11 +302,18 @@ public class CallService {
public void muteParticipant(String confId, String peerId, boolean mute) {
mExecutor.execute(() -> {
Log.i(TAG, "mute() participant... " + peerId);
Log.i(TAG, "mute participant... " + peerId);
JamiService.muteParticipant(confId, peerId, mute);
});
}
public void hangupParticipant(String confId, String peerId) {
mExecutor.execute(() -> {
Log.i(TAG, "hangup participant... " + peerId);
JamiService.hangupParticipant(confId, peerId);
});
}
public void hold(final String callId) {
mExecutor.execute(() -> {
Log.i(TAG, "hold() running... " + callId);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment