Conference paused is now working
This commit is contained in:
parent
0da770e015
commit
884154ea40
3 changed files with 70 additions and 23 deletions
38
res/layout/conference_paused_row.xml
Normal file
38
res/layout/conference_paused_row.xml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:background="@color/colorA"
|
||||||
|
android:alpha="0.5"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_margin="2dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_picture"
|
||||||
|
android:src="@drawable/conference_start"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/contact_name"
|
||||||
|
android:text="@string/conference"
|
||||||
|
style="@style/font14"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_width="0dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical|left"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="10dp"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/call_pause"
|
||||||
|
android:src="@drawable/pause_small_over_selected"
|
||||||
|
android:contentDescription="@string/content_description_pause"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:gravity="center_vertical"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -1471,27 +1471,31 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayPausedCalls(Resources resources, final LinphoneCall call, int index) {
|
private void displayPausedCalls(Resources resources, final LinphoneCall call, int index) {
|
||||||
LinphoneAddress lAddress = call.getRemoteAddress();
|
|
||||||
|
|
||||||
// Control Row
|
// Control Row
|
||||||
LinearLayout callView = (LinearLayout) inflater.inflate(R.layout.call_inactive_row, container, false);
|
LinearLayout callView;
|
||||||
|
|
||||||
|
if(call == null) {
|
||||||
|
callView = (LinearLayout) inflater.inflate(R.layout.conference_paused_row, container, false);
|
||||||
|
callView.setId(index + 1);
|
||||||
|
callView.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
pauseOrResumeConference();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
callView = (LinearLayout) inflater.inflate(R.layout.call_inactive_row, container, false);
|
||||||
callView.setId(index+1);
|
callView.setId(index+1);
|
||||||
|
|
||||||
TextView contactName = (TextView) callView.findViewById(R.id.contact_name);
|
TextView contactName = (TextView) callView.findViewById(R.id.contact_name);
|
||||||
ImageView contactImage = (ImageView) callView.findViewById(R.id.contact_picture);
|
ImageView contactImage = (ImageView) callView.findViewById(R.id.contact_picture);
|
||||||
|
|
||||||
if(call == null) {
|
LinphoneAddress lAddress = call.getRemoteAddress();
|
||||||
if(isConferenceRunning){
|
|
||||||
Log.w("conf running");
|
|
||||||
}
|
|
||||||
contactName.setText(resources.getString(R.string.conference));
|
|
||||||
contactImage.setImageResource(R.drawable.conference_start);
|
|
||||||
} else {
|
|
||||||
setContactInformation(contactName, contactImage, lAddress);
|
setContactInformation(contactName, contactImage, lAddress);
|
||||||
displayCallStatusIconAndReturnCallPaused(callView, call);
|
displayCallStatusIconAndReturnCallPaused(callView, call);
|
||||||
registerCallDurationTimer(callView, call);
|
registerCallDurationTimer(callView, call);
|
||||||
callsList.addView(callView);
|
|
||||||
}
|
}
|
||||||
|
callsList.addView(callView);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setContactInformation(TextView contactName, ImageView contactPicture, LinphoneAddress lAddress) {
|
private void setContactInformation(TextView contactName, ImageView contactPicture, LinphoneAddress lAddress) {
|
||||||
|
@ -1563,7 +1567,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
conferenceList.setVisibility(View.GONE);
|
conferenceList.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO DON'T SHOW CALLLIST IF THERE IS VIDEO CALL
|
|
||||||
if(callsList != null) {
|
if(callsList != null) {
|
||||||
callsList.setVisibility(View.VISIBLE);
|
callsList.setVisibility(View.VISIBLE);
|
||||||
callsList.removeAllViews();
|
callsList.removeAllViews();
|
||||||
|
@ -1574,8 +1577,12 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isConfPaused = false;
|
||||||
for (LinphoneCall call : LinphoneManager.getLc().getCalls()) {
|
for (LinphoneCall call : LinphoneManager.getLc().getCalls()) {
|
||||||
if(call.isInConference()) break;
|
if(call.isInConference() && !isConferenceRunning) {
|
||||||
|
isConfPaused = true;
|
||||||
|
index++;
|
||||||
|
} else {
|
||||||
if (call != LinphoneManager.getLc().getCurrentCall()) {
|
if (call != LinphoneManager.getLc().getCurrentCall()) {
|
||||||
displayPausedCalls(resources, call, index);
|
displayPausedCalls(resources, call, index);
|
||||||
index++;
|
index++;
|
||||||
|
@ -1583,15 +1590,18 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
displayCurrentCall(call);
|
displayCurrentCall(call);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (LinphoneManager.getLc().getCurrentCall() == null && !isConferenceRunning ) {
|
if(isConfPaused && !isConferenceRunning){
|
||||||
|
displayPausedCalls(resources, null, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LinphoneManager.getLc().getCurrentCall() == null && !isConferenceRunning) {
|
||||||
showAudioView();
|
showAudioView();
|
||||||
mActiveCallHeader.setVisibility(View.GONE);
|
mActiveCallHeader.setVisibility(View.GONE);
|
||||||
mNoCurrentCall.setVisibility(View.VISIBLE);
|
mNoCurrentCall.setVisibility(View.VISIBLE);
|
||||||
video.setEnabled(false);
|
video.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//callsList.invalidate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1625,6 +1635,7 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
conferenceStatus.setImageResource(R.drawable.pause_big_default);
|
conferenceStatus.setImageResource(R.drawable.pause_big_default);
|
||||||
lc.enterConference();
|
lc.enterConference();
|
||||||
}
|
}
|
||||||
|
refreshCallList(getResources());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayConferenceParticipant(int index, final LinphoneCall call){
|
private void displayConferenceParticipant(int index, final LinphoneCall call){
|
||||||
|
@ -1680,7 +1691,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
conferenceList.setVisibility(View.VISIBLE);
|
conferenceList.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,6 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.setExpires("604800")
|
builder.setExpires("604800")
|
||||||
.setOutboundProxyEnabled(true)
|
|
||||||
.setAvpfEnabled(true)
|
.setAvpfEnabled(true)
|
||||||
.setAvpfRRInterval(3)
|
.setAvpfRRInterval(3)
|
||||||
.setQualityReportingCollector("sip:voip-metrics@sip.linphone.org")
|
.setQualityReportingCollector("sip:voip-metrics@sip.linphone.org")
|
||||||
|
|
Loading…
Reference in a new issue