Fix video sending problem
This commit is contained in:
parent
b8746b31c8
commit
ccce719c6f
3 changed files with 5 additions and 9 deletions
|
@ -394,6 +394,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
|
||||||
|
|
||||||
|
|
||||||
public void onCallStateChanged(LinphoneCall call, State state, String message) {
|
public void onCallStateChanged(LinphoneCall call, State state, String message) {
|
||||||
|
Log.i("OnCallStateChanged: call=", call, ", state=", state, ", message=", message, ", currentCall=", mCurrentCall);
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (lc==null) {
|
if (lc==null) {
|
||||||
/* we are certainly exiting, ignore then.*/
|
/* we are certainly exiting, ignore then.*/
|
||||||
|
@ -402,15 +403,13 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
|
||||||
|
|
||||||
if (state==LinphoneCall.State.OutgoingInit){
|
if (state==LinphoneCall.State.OutgoingInit){
|
||||||
mCurrentCall=call;
|
mCurrentCall=call;
|
||||||
|
call.enableCamera(LinphoneManager.getInstance().shareMyCamera());
|
||||||
enterIncallMode(lc);
|
enterIncallMode(lc);
|
||||||
if (!LinphoneManager.getInstance().shareMyCamera())
|
|
||||||
call.enableCamera(false);
|
|
||||||
LinphoneActivity.instance().startOrientationSensor();
|
LinphoneActivity.instance().startOrientationSensor();
|
||||||
}else if (state==LinphoneCall.State.IncomingReceived){
|
}else if (state==LinphoneCall.State.IncomingReceived){
|
||||||
mCurrentCall=call;
|
mCurrentCall=call;
|
||||||
callPending(call);
|
callPending(call);
|
||||||
if (!LinphoneManager.getInstance().shareMyCamera())
|
call.enableCamera(LinphoneManager.getInstance().shareMyCamera());
|
||||||
call.enableCamera(false);
|
|
||||||
LinphoneActivity.instance().startOrientationSensor();
|
LinphoneActivity.instance().startOrientationSensor();
|
||||||
}else if (state==LinphoneCall.State.Connected){
|
}else if (state==LinphoneCall.State.Connected){
|
||||||
if (call.getDirection() == CallDirection.Incoming) {
|
if (call.getDirection() == CallDirection.Incoming) {
|
||||||
|
|
|
@ -847,7 +847,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shareMyCamera() {
|
public boolean shareMyCamera() {
|
||||||
return mPref.getBoolean(getString(R.string.pref_video_automatically_share_my_video), false);
|
return mPref.getBoolean(getString(R.string.pref_video_automatically_share_my_video_key), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAudioModeIncallForGalaxyS() {
|
public void setAudioModeIncallForGalaxyS() {
|
||||||
|
|
|
@ -103,10 +103,7 @@ public class VideoCallActivity extends SoftVolumeActivity {
|
||||||
if (LinphoneManager.getLc().isIncall()) {
|
if (LinphoneManager.getLc().isIncall()) {
|
||||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||||
if (call != null) {
|
if (call != null) {
|
||||||
boolean camEnabled = call.cameraEnabled();
|
updatePreview(call.cameraEnabled());
|
||||||
|
|
||||||
LinphoneManager.getInstance().sendStaticImage(!camEnabled);
|
|
||||||
updatePreview(camEnabled);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue