Merge branch 'master' of git.linphone.org:linphone-android

This commit is contained in:
Simon Morlat 2011-11-09 17:30:40 +01:00
commit 142f34f53c

View file

@ -747,6 +747,12 @@ public class IncallActivity extends ListActivity implements
private Handler mHandler = new Handler(); private Handler mHandler = new Handler();
private static int conferenceCalleesNb(LinphoneCore lc) {
int count = lc.getConferenceSize();
if (lc.isInConference()) count--;
return count;
}
private void updateSimpleControlButtons() { private void updateSimpleControlButtons() {
LinphoneCall activeCall = lc().getCurrentCall(); LinphoneCall activeCall = lc().getCurrentCall();
View control = findViewById(R.id.conf_control_buttons); View control = findViewById(R.id.conf_control_buttons);
@ -761,7 +767,7 @@ public class IncallActivity extends ListActivity implements
resume.setVisibility(showResume ? VISIBLE : GONE); resume.setVisibility(showResume ? VISIBLE : GONE);
View merge = control.findViewById(R.id.conf_simple_merge); View merge = control.findViewById(R.id.conf_simple_merge);
boolean showMerge = callNb >= 2; boolean showMerge = callNb >= 2 && callNb > conferenceCalleesNb(lc());
merge.setVisibility(showMerge ? VISIBLE : GONE); merge.setVisibility(showMerge ? VISIBLE : GONE);
View transfer = control.findViewById(R.id.conf_simple_transfer); View transfer = control.findViewById(R.id.conf_simple_transfer);
@ -940,7 +946,7 @@ public class IncallActivity extends ListActivity implements
mSpeakerButton.setChecked(false); mSpeakerButton.setChecked(false);
break; break;
default: default:
throw new RuntimeException("Unkown audio state " + state); throw new RuntimeException("Unknown audio state " + state);
} }
} }
}); });