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) {
|
||||
LinphoneAddress lAddress = call.getRemoteAddress();
|
||||
|
||||
// Control Row
|
||||
LinearLayout callView = (LinearLayout) inflater.inflate(R.layout.call_inactive_row, container, false);
|
||||
callView.setId(index+1);
|
||||
|
||||
TextView contactName = (TextView) callView.findViewById(R.id.contact_name);
|
||||
ImageView contactImage = (ImageView) callView.findViewById(R.id.contact_picture);
|
||||
LinearLayout callView;
|
||||
|
||||
if(call == null) {
|
||||
if(isConferenceRunning){
|
||||
Log.w("conf running");
|
||||
}
|
||||
contactName.setText(resources.getString(R.string.conference));
|
||||
contactImage.setImageResource(R.drawable.conference_start);
|
||||
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);
|
||||
|
||||
TextView contactName = (TextView) callView.findViewById(R.id.contact_name);
|
||||
ImageView contactImage = (ImageView) callView.findViewById(R.id.contact_picture);
|
||||
|
||||
LinphoneAddress lAddress = call.getRemoteAddress();
|
||||
setContactInformation(contactName, contactImage, lAddress);
|
||||
displayCallStatusIconAndReturnCallPaused(callView, call);
|
||||
registerCallDurationTimer(callView, call);
|
||||
callsList.addView(callView);
|
||||
}
|
||||
callsList.addView(callView);
|
||||
}
|
||||
|
||||
private void setContactInformation(TextView contactName, ImageView contactPicture, LinphoneAddress lAddress) {
|
||||
|
@ -1563,7 +1567,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
conferenceList.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//TODO DON'T SHOW CALLLIST IF THERE IS VIDEO CALL
|
||||
if(callsList != null) {
|
||||
callsList.setVisibility(View.VISIBLE);
|
||||
callsList.removeAllViews();
|
||||
|
@ -1574,24 +1577,31 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
return;
|
||||
}
|
||||
|
||||
boolean isConfPaused = false;
|
||||
for (LinphoneCall call : LinphoneManager.getLc().getCalls()) {
|
||||
if(call.isInConference()) break;
|
||||
if (call != LinphoneManager.getLc().getCurrentCall()) {
|
||||
displayPausedCalls(resources, call, index);
|
||||
if(call.isInConference() && !isConferenceRunning) {
|
||||
isConfPaused = true;
|
||||
index++;
|
||||
} else {
|
||||
displayCurrentCall(call);
|
||||
if (call != LinphoneManager.getLc().getCurrentCall()) {
|
||||
displayPausedCalls(resources, call, index);
|
||||
index++;
|
||||
} else {
|
||||
displayCurrentCall(call);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LinphoneManager.getLc().getCurrentCall() == null && !isConferenceRunning ) {
|
||||
if(isConfPaused && !isConferenceRunning){
|
||||
displayPausedCalls(resources, null, index);
|
||||
}
|
||||
|
||||
if (LinphoneManager.getLc().getCurrentCall() == null && !isConferenceRunning) {
|
||||
showAudioView();
|
||||
mActiveCallHeader.setVisibility(View.GONE);
|
||||
mNoCurrentCall.setVisibility(View.VISIBLE);
|
||||
video.setEnabled(false);
|
||||
}
|
||||
|
||||
//callsList.invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1625,6 +1635,7 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
conferenceStatus.setImageResource(R.drawable.pause_big_default);
|
||||
lc.enterConference();
|
||||
}
|
||||
refreshCallList(getResources());
|
||||
}
|
||||
|
||||
private void displayConferenceParticipant(int index, final LinphoneCall call){
|
||||
|
@ -1680,7 +1691,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
conferenceList.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,7 +351,6 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
}
|
||||
|
||||
builder.setExpires("604800")
|
||||
.setOutboundProxyEnabled(true)
|
||||
.setAvpfEnabled(true)
|
||||
.setAvpfRRInterval(3)
|
||||
.setQualityReportingCollector("sip:voip-metrics@sip.linphone.org")
|
||||
|
|
Loading…
Reference in a new issue