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());
|
callFragment.setArguments(getIntent().getExtras());
|
||||||
getFragmentManager().beginTransaction().add(R.id.fragmentContainer, callFragment).commitAllowingStateLoss();
|
getFragmentManager().beginTransaction().add(R.id.fragmentContainer, callFragment).commitAllowingStateLoss();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,12 +305,8 @@ public class CallIncomingActivity extends Activity implements LinphoneSliderTrig
|
||||||
if (!LinphoneActivity.isInstanciated()) {
|
if (!LinphoneActivity.isInstanciated()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final LinphoneCallParams remoteParams = mCall.getRemoteParams();
|
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||||
if (remoteParams != null && remoteParams.getVideoEnabled() && LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests()) {
|
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||||
LinphoneActivity.instance().startVideoActivity(mCall);
|
|
||||||
} else {
|
|
||||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,12 +101,7 @@ public class CallOutgoingActivity extends Activity implements OnClickListener{
|
||||||
if (!LinphoneActivity.isInstanciated()) {
|
if (!LinphoneActivity.isInstanciated()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final LinphoneCallParams remoteParams = mCall.getRemoteParams();
|
LinphoneActivity.instance().startIncallActivity(mCall);
|
||||||
if (remoteParams != null && remoteParams.getVideoEnabled() && LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests()) {
|
|
||||||
LinphoneActivity.instance().startVideoActivity(mCall);
|
|
||||||
} else {
|
|
||||||
LinphoneActivity.instance().startIncallActivity(mCall);
|
|
||||||
}
|
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
} else if (state == State.Error) {
|
} else if (state == State.Error) {
|
||||||
|
|
|
@ -943,16 +943,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
LinphoneManager.getInstance().newOutgoingCall(address);
|
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) {
|
public void startIncallActivity(LinphoneCall currentCall) {
|
||||||
Intent intent = new Intent(this, CallActivity.class);
|
Intent intent = new Intent(this, CallActivity.class);
|
||||||
intent.putExtra("VideoEnabled", false);
|
|
||||||
startOrientationSensor();
|
startOrientationSensor();
|
||||||
startActivityForResult(intent, CALL_ACTIVITY);
|
startActivityForResult(intent, CALL_ACTIVITY);
|
||||||
}
|
}
|
||||||
|
@ -1024,8 +1016,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||||
if (call.getState() == LinphoneCall.State.IncomingReceived) {
|
if (call.getState() == LinphoneCall.State.IncomingReceived) {
|
||||||
startActivity(new Intent(LinphoneActivity.this, CallIncomingActivity.class));
|
startActivity(new Intent(LinphoneActivity.this, CallIncomingActivity.class));
|
||||||
} else if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
|
||||||
startVideoActivity(call);
|
|
||||||
} else {
|
} else {
|
||||||
startIncallActivity(call);
|
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) {
|
} else if (callState == State.OutgoingInit || callState == State.OutgoingProgress || callState == State.OutgoingRinging) {
|
||||||
startActivity(new Intent(this, CallOutgoingActivity.class));
|
startActivity(new Intent(this, CallOutgoingActivity.class));
|
||||||
} else {
|
} else {
|
||||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
startIncallActivity(call);
|
||||||
startVideoActivity(call);
|
|
||||||
} else {
|
|
||||||
startIncallActivity(call);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1383,11 +1369,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
} else if (extras != null && extras.getBoolean("Notification", false)) {
|
} else if (extras != null && extras.getBoolean("Notification", false)) {
|
||||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
startIncallActivity(call);
|
||||||
startVideoActivity(call);
|
|
||||||
} else {
|
|
||||||
startIncallActivity(call);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DialerFragment dialerFragment = DialerFragment.instance();
|
DialerFragment dialerFragment = DialerFragment.instance();
|
||||||
|
|
Loading…
Reference in a new issue