Fix add call participant switch view

This commit is contained in:
Erwan Croze 2018-11-15 09:14:04 +01:00
parent ed439af26c
commit 86e8be31cd
5 changed files with 14 additions and 16 deletions

View file

@ -805,7 +805,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
if (mLc.isIncomingInvitePending() && on) {
handsetON = true;
mLc.acceptCall(mLc.getCurrentCall());
LinphoneActivity.instance().startIncallActivity(mLc.getCurrentCall());
LinphoneActivity.instance().startIncallActivity();
} else if(on && CallActivity.isInstanciated()) {
handsetON = true;
CallActivity.instance().setSpeakerEnabled(true);
@ -1218,7 +1218,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
if (LinphoneManager.getInstance() != null) {
LinphoneManager.getInstance().routeAudioToReceiver();
if (LinphoneActivity.instance() != null)
LinphoneActivity.instance().startIncallActivity(call);
LinphoneActivity.instance().startIncallActivity();
}
}
}

View file

@ -1063,7 +1063,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
}
}
public void startIncallActivity(Call currentCall) {
public void startIncallActivity() {
Intent intent = new Intent(this, CallActivity.class);
startOrientationSensor();
startActivityForResult(intent, CALL_ACTIVITY);
@ -1144,7 +1144,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
if (call.getState() == Call.State.IncomingReceived) {
startActivity(new Intent(LinphoneActivity.this, CallIncomingActivity.class));
} else {
startIncallActivity(call);
startIncallActivity();
}
}
}
@ -1465,7 +1465,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
} else if (onCallStateChanged == State.OutgoingInit || onCallStateChanged == State.OutgoingProgress || onCallStateChanged == State.OutgoingRinging) {
startActivity(new Intent(this, CallOutgoingActivity.class));
} else {
startIncallActivity(call);
startIncallActivity();
}
}
}
@ -1543,8 +1543,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
displayInapp();
} else if (extras != null && extras.getBoolean("Notification", false)) {
if (LinphoneManager.getLc().getCallsNb() > 0) {
Call call = LinphoneManager.getLc().getCalls()[0];
startIncallActivity(call);
startIncallActivity();
}
}else if (extras != null && extras.getBoolean("StartCall", false)) {
if (CallActivity.isInstanciated()) {
@ -1552,10 +1551,11 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
} else {
mAddressWaitingToBeCalled = extras.getString("NumberToCall");
goToDialerFragment();
//startActivity(new Intent(this, CallIncomingActivity.class));
}
} else if (extras != null && extras.getBoolean("Transfer", false)) {
intent.putExtra("DoNotGoToCallActivity", true);
} else if (extras != null && extras.getBoolean("AddCall", false)) {
intent.putExtra("DoNotGoToCallActivity", true);
} else {
DialerFragment dialerFragment = DialerFragment.instance();
if (dialerFragment != null) {

View file

@ -1120,9 +1120,9 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
public void goBackToDialer() {
Intent intent = new Intent();
intent.putExtra("Transfer", false);
setResult(Activity.RESULT_FIRST_USER, intent);
finish();
intent.setClass(this, LinphoneActivity.class);
intent.putExtra("AddCall", true);
startActivity(intent);
}
private void goBackToDialerAndDisplayTransferButton() {
@ -1130,7 +1130,6 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
intent.setClass(this, LinphoneActivity.class);
intent.putExtra("Transfer", true);
startActivity(intent);
finish();
}
private void goToChatList() {
@ -1138,7 +1137,6 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
intent.setClass(this, LinphoneActivity.class);
intent.putExtra("GoToChat", true);
startActivity(intent);
finish();
}
public void acceptCallUpdate(boolean accept) {

View file

@ -356,7 +356,7 @@ public class CallIncomingActivity extends LinphoneGenericActivity implements Lin
return;
}
LinphoneManager.getInstance().routeAudioToReceiver();
LinphoneActivity.instance().startIncallActivity(mCall);
LinphoneActivity.instance().startIncallActivity();
}
}

View file

@ -118,7 +118,7 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
if (!LinphoneActivity.isInstanciated()) {
return;
}
LinphoneActivity.instance().startIncallActivity(mCall);
LinphoneActivity.instance().startIncallActivity();
finish();
return;
} else if (state == State.Error) {
@ -181,7 +181,7 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
if (!LinphoneActivity.isInstanciated()) {
return;
}
LinphoneActivity.instance().startIncallActivity(mCall);
LinphoneActivity.instance().startIncallActivity();
finish();
return;
}