Allow several calls with the same recipient.

This commit is contained in:
Guillaume Beraudo 2011-11-07 14:54:27 +01:00
parent aaf3bdbbff
commit bdf69da535
5 changed files with 13 additions and 11 deletions

View file

@ -815,11 +815,13 @@ public class ConferenceActivity extends ListActivity implements
} else if (state == State.Paused || state == State.PausedByRemote || state == State.StreamsRunning) { } else if (state == State.Paused || state == State.PausedByRemote || state == State.StreamsRunning) {
Collections.sort(adapter.linphoneCalls, ConferenceActivity.this); Collections.sort(adapter.linphoneCalls, ConferenceActivity.this);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
} else if (state == State.CallEnd) { } else if (state == State.CallEnd || state == State.Error || state == State.CallReleased) {
if (adapter.linphoneCalls.contains(call)) {
adapter.linphoneCalls.remove(call); adapter.linphoneCalls.remove(call);
Collections.sort(adapter.linphoneCalls, ConferenceActivity.this); Collections.sort(adapter.linphoneCalls, ConferenceActivity.this);
recreateActivity(adapter); recreateActivity(adapter);
} }
}
updateConfState(); updateConfState();
} }
@ -851,8 +853,7 @@ public class ConferenceActivity extends ListActivity implements
boolean invalidUri; boolean invalidUri;
try { try {
String target = lc().interpretUrl(uri).asStringUriOnly(); String target = lc().interpretUrl(uri).asStringUriOnly();
LinphoneCall alreadyInCall = lc().findCallFromUri(target); invalidUri = lc().isMyself(target);
invalidUri = alreadyInCall != null || lc().isMyself(target);
} catch (LinphoneCoreException e) { } catch (LinphoneCoreException e) {
invalidUri = true; invalidUri = true;
} }

View file

@ -55,10 +55,11 @@ public class IncomingCallActivity extends Activity implements LinphoneManagerRea
private void findIncomingCall(Intent intent) { private void findIncomingCall(Intent intent) {
String stringUri = intent.getStringExtra("stringUri"); String stringUri = intent.getStringExtra("stringUri");
mCall = LinphoneManager.getLc().findCallFromUri(stringUri); // Only one call ringing at a time is allowed
mCall = LinphoneManager.getLc().getCurrentCall();
if (mCall == null) { if (mCall == null) {
Log.e("Couldn't find incoming call from ", stringUri); Log.e("Couldn't find incoming call from ", stringUri);
Toast.makeText(this, "Error", Toast.LENGTH_SHORT); finish();
} }
} }

@ -1 +1 @@
Subproject commit 4eabd05b149d18629098f3254f15c8d14ff6664c Subproject commit 0a98b96e5c72191d42fb8727e1088db126edf005

@ -1 +1 @@
Subproject commit 37d363d04e8b9300a526dde4f3b331ec8dbbd079 Subproject commit c27b9b6702f62cdbd2143c1ccc85b8980b83adac

@ -1 +1 @@
Subproject commit f706103cc3b7bb5b31c02fd83f8e221677264b68 Subproject commit cfaa4721e5bea988e585ee221ec88e97b657925d