Revert "Allow several calls with the same recipient."

This reverts commit bdf69da535.
This commit is contained in:
Guillaume Beraudo 2011-11-08 09:02:12 +01:00
parent bdf69da535
commit b4b2f22e5c
5 changed files with 11 additions and 13 deletions

View file

@ -815,13 +815,11 @@ 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 || state == State.Error || state == State.CallReleased) { } else if (state == State.CallEnd) {
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();
} }
@ -853,7 +851,8 @@ public class ConferenceActivity extends ListActivity implements
boolean invalidUri; boolean invalidUri;
try { try {
String target = lc().interpretUrl(uri).asStringUriOnly(); String target = lc().interpretUrl(uri).asStringUriOnly();
invalidUri = lc().isMyself(target); LinphoneCall alreadyInCall = lc().findCallFromUri(target);
invalidUri = alreadyInCall != null || lc().isMyself(target);
} catch (LinphoneCoreException e) { } catch (LinphoneCoreException e) {
invalidUri = true; invalidUri = true;
} }

View file

@ -55,11 +55,10 @@ 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");
// Only one call ringing at a time is allowed mCall = LinphoneManager.getLc().findCallFromUri(stringUri);
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);
finish(); Toast.makeText(this, "Error", Toast.LENGTH_SHORT);
} }
} }

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

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

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