UI reacts immediately after the user has clicked the answer button when a call is received. It stops ringing and shows an intermediate state

(connecting) until the protocol provider has sent the connected
event.
cusax-fix
Yana Stamcheva 20 years ago
parent 942e30938a
commit f677309ed0

@ -169,12 +169,22 @@ public void actionPerformed(ActionEvent evt)
&& selectedPanel instanceof CallPanel
&& ((CallPanel)selectedPanel).getCall().getCallState()
== CallState.CALL_INITIALIZATION) {
SoundLoader.getSound(SoundLoader.BUSY).stop();
SoundLoader.stop(Constants.getDefaultIncomingCallAudio());
CallPanel callPanel = (CallPanel) selectedPanel;
Iterator participantPanels = callPanel.getParticipantsPanels();
while (participantPanels.hasNext())
{
CallParticipantPanel panel
= (CallParticipantPanel) participantPanels.next();
panel.setState("Connecting");
}
Call call = callPanel.getCall();
answerCall(call);
@ -183,7 +193,7 @@ public void actionPerformed(ActionEvent evt)
else if(selectedPanel != null
&& selectedPanel instanceof CallListPanel
&& ((CallListPanel) selectedPanel)
.getCallList().getSelectedIndex() != -1) {
.getCallList().getSelectedIndex() != -1) {
CallListPanel callListPanel = (CallListPanel) selectedPanel;
@ -198,7 +208,7 @@ else if(selectedPanel != null
//call button is pressed over the contact list
else if(selectedPanel != null
&& selectedPanel instanceof ContactListPanel){
//call button is pressed when a meta contact is selected
if(isCallMetaContact) {
@ -450,7 +460,7 @@ public void incomingCallReceived(CallEvent event)
* button.
*/
public void callEnded(CallEvent event)
{
{
Call sourceCall = event.getSourceCall();
SoundLoader.getSound(SoundLoader.BUSY).stop();

@ -278,23 +278,23 @@ else if(evt.getNewValue() == CallParticipantState.CONNECTED) {
SoundLoader.stop(Constants.getDefaultOutgoingCallAudio());
participantPanel.startCallTimer();
}
else if(evt.getNewValue() == CallParticipantState.CONNECTING) {
else if(evt.getNewValue() == CallParticipantState.CONNECTING) {
}
else if(evt.getNewValue() == CallParticipantState.DISCONNECTED) {
else if(evt.getNewValue() == CallParticipantState.DISCONNECTED) {
//The call participant should be already removed from the call
//see callParticipantRemoved
}
else if(evt.getNewValue() == CallParticipantState.FAILED) {
else if(evt.getNewValue() == CallParticipantState.FAILED) {
//The call participant should be already removed from the call
//see callParticipantRemoved
}
else if(evt.getNewValue() == CallParticipantState.INCOMING_CALL) {
else if(evt.getNewValue() == CallParticipantState.INCOMING_CALL) {
}
else if(evt.getNewValue() == CallParticipantState.INITIATING_CALL) {
else if(evt.getNewValue() == CallParticipantState.INITIATING_CALL) {
}
else if(evt.getNewValue() == CallParticipantState.ON_HOLD) {
else if(evt.getNewValue() == CallParticipantState.ON_HOLD) {
}
else if(evt.getNewValue() == CallParticipantState.UNKNOWN) {
else if(evt.getNewValue() == CallParticipantState.UNKNOWN) {
}
}
@ -376,4 +376,9 @@ public void actionPerformed(ActionEvent e)
}
}
public Iterator getParticipantsPanels()
{
return participantsPanels.values().iterator();
}
}

Loading…
Cancel
Save