Fix outgoing call view
This commit is contained in:
parent
8d171d509d
commit
4938089d96
1 changed files with 20 additions and 10 deletions
|
@ -140,14 +140,24 @@ public class CallOutgoingActivity extends Activity implements OnClickListener{
|
||||||
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null) {
|
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null) {
|
||||||
List<LinphoneCall> calls = LinphoneUtils.getLinphoneCalls(LinphoneManager.getLc());
|
List<LinphoneCall> calls = LinphoneUtils.getLinphoneCalls(LinphoneManager.getLc());
|
||||||
for (LinphoneCall call : calls) {
|
for (LinphoneCall call : calls) {
|
||||||
if (State.OutgoingInit == call.getState() || State.OutgoingProgress == call.getState() || State.OutgoingRinging == call.getState() || State.OutgoingEarlyMedia == call.getState()) {
|
State cstate = call.getState();
|
||||||
|
if (State.OutgoingInit == cstate || State.OutgoingProgress == cstate
|
||||||
|
|| State.OutgoingRinging == cstate || State.OutgoingEarlyMedia == cstate) {
|
||||||
mCall = call;
|
mCall = call;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (State.StreamsRunning == cstate) {
|
||||||
|
if (!LinphoneActivity.isInstanciated()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mCall == null) {
|
if (mCall == null) {
|
||||||
Log.e("Couldn't find outgoing call");
|
Log.e("Couldn't find outgoing call");
|
||||||
|
LinphoneActivity.instance().goToDialerFragment();
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue