Fixed audio routes no being set correctly all the time
This commit is contained in:
parent
6ac636b5b3
commit
e39cc0112d
4 changed files with 5 additions and 33 deletions
|
@ -300,7 +300,6 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
|
||||
callFragment.setArguments(getIntent().getExtras());
|
||||
getFragmentManager().beginTransaction().add(R.id.fragmentContainer, callFragment).commitAllowingStateLoss();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -305,12 +305,8 @@ public class CallIncomingActivity extends Activity implements LinphoneSliderTrig
|
|||
if (!LinphoneActivity.isInstanciated()) {
|
||||
return;
|
||||
}
|
||||
final LinphoneCallParams remoteParams = mCall.getRemoteParams();
|
||||
if (remoteParams != null && remoteParams.getVideoEnabled() && LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests()) {
|
||||
LinphoneActivity.instance().startVideoActivity(mCall);
|
||||
} else {
|
||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||
}
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,12 +101,7 @@ public class CallOutgoingActivity extends Activity implements OnClickListener{
|
|||
if (!LinphoneActivity.isInstanciated()) {
|
||||
return;
|
||||
}
|
||||
final LinphoneCallParams remoteParams = mCall.getRemoteParams();
|
||||
if (remoteParams != null && remoteParams.getVideoEnabled() && LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests()) {
|
||||
LinphoneActivity.instance().startVideoActivity(mCall);
|
||||
} else {
|
||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||
}
|
||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||
finish();
|
||||
return;
|
||||
} else if (state == State.Error) {
|
||||
|
|
|
@ -943,16 +943,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
LinphoneManager.getInstance().newOutgoingCall(address);
|
||||
}
|
||||
|
||||
public void startVideoActivity(LinphoneCall currentCall) {
|
||||
Intent intent = new Intent(this, CallActivity.class);
|
||||
intent.putExtra("VideoEnabled", true);
|
||||
startOrientationSensor();
|
||||
startActivityForResult(intent, CALL_ACTIVITY);
|
||||
}
|
||||
|
||||
public void startIncallActivity(LinphoneCall currentCall) {
|
||||
Intent intent = new Intent(this, CallActivity.class);
|
||||
intent.putExtra("VideoEnabled", false);
|
||||
startOrientationSensor();
|
||||
startActivityForResult(intent, CALL_ACTIVITY);
|
||||
}
|
||||
|
@ -1024,8 +1016,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||
if (call.getState() == LinphoneCall.State.IncomingReceived) {
|
||||
startActivity(new Intent(LinphoneActivity.this, CallIncomingActivity.class));
|
||||
} else if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||
startVideoActivity(call);
|
||||
} else {
|
||||
startIncallActivity(call);
|
||||
}
|
||||
|
@ -1333,11 +1323,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
} else if (callState == State.OutgoingInit || callState == State.OutgoingProgress || callState == State.OutgoingRinging) {
|
||||
startActivity(new Intent(this, CallOutgoingActivity.class));
|
||||
} else {
|
||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||
startVideoActivity(call);
|
||||
} else {
|
||||
startIncallActivity(call);
|
||||
}
|
||||
startIncallActivity(call);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1383,11 +1369,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
} else if (extras != null && extras.getBoolean("Notification", false)) {
|
||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||
startVideoActivity(call);
|
||||
} else {
|
||||
startIncallActivity(call);
|
||||
}
|
||||
startIncallActivity(call);
|
||||
}
|
||||
} else {
|
||||
DialerFragment dialerFragment = DialerFragment.instance();
|
||||
|
|
Loading…
Reference in a new issue