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) {
|
||||
Log.i("OnCallStateChanged: call=", call, ", state=", state, ", message=", message, ", currentCall=", mCurrentCall);
|
||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc==null) {
|
||||
/* we are certainly exiting, ignore then.*/
|
||||
|
@ -402,15 +403,13 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
|
|||
|
||||
if (state==LinphoneCall.State.OutgoingInit){
|
||||
mCurrentCall=call;
|
||||
call.enableCamera(LinphoneManager.getInstance().shareMyCamera());
|
||||
enterIncallMode(lc);
|
||||
if (!LinphoneManager.getInstance().shareMyCamera())
|
||||
call.enableCamera(false);
|
||||
LinphoneActivity.instance().startOrientationSensor();
|
||||
}else if (state==LinphoneCall.State.IncomingReceived){
|
||||
mCurrentCall=call;
|
||||
callPending(call);
|
||||
if (!LinphoneManager.getInstance().shareMyCamera())
|
||||
call.enableCamera(false);
|
||||
call.enableCamera(LinphoneManager.getInstance().shareMyCamera());
|
||||
LinphoneActivity.instance().startOrientationSensor();
|
||||
}else if (state==LinphoneCall.State.Connected){
|
||||
if (call.getDirection() == CallDirection.Incoming) {
|
||||
|
|
|
@ -847,7 +847,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -103,10 +103,7 @@ public class VideoCallActivity extends SoftVolumeActivity {
|
|||
if (LinphoneManager.getLc().isIncall()) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||
if (call != null) {
|
||||
boolean camEnabled = call.cameraEnabled();
|
||||
|
||||
LinphoneManager.getInstance().sendStaticImage(!camEnabled);
|
||||
updatePreview(camEnabled);
|
||||
updatePreview(call.cameraEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue