diff --git a/src/org/linphone/DialerActivity.java b/src/org/linphone/DialerActivity.java index e87898fac..40cedc853 100644 --- a/src/org/linphone/DialerActivity.java +++ b/src/org/linphone/DialerActivity.java @@ -231,7 +231,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { if (lLinphoneCore.isIncall()) { mCurrentCallState = lLinphoneCore.getCurrentCall().getState(); if(lLinphoneCore.isInComingInvitePending()) { - callPending(); + callPending(lLinphoneCore.getCurrentCall()); } else { mCall.setEnabled(false); mHangup.setEnabled(!mCall.isEnabled()); @@ -444,6 +444,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { if (mCurrentCallState == LinphoneCall.State.IncomingReceived) { //previous state was ringing, so stop ringing stoptRinging(); + routeAudioToReceiver(); } if (state == LinphoneCall.State.OutgoingInit) { mWakeLock.acquire(); @@ -451,7 +452,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { routeAudioToReceiver(); } else if (state == LinphoneCall.State.IncomingReceived) { resetCameraFromPreferences(); - callPending(); + callPending(call); } else if (state == LinphoneCall.State.Connected) { enterIncalMode(lc); } else if (state == LinphoneCall.State.Error) { @@ -557,7 +558,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { mAudioManager.setSpeakerphoneOn(false); } } - private void callPending() { + private void callPending(LinphoneCall call) { mDecline.setEnabled(true); routeAudioToSpeaker(); @@ -565,6 +566,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { boolean prefVideoEnable = mPref.getBoolean(getString(R.string.pref_video_enable_key), false); boolean prefAutomaticallyShareMyCamera = mPref.getBoolean(getString(R.string.pref_video_automatically_share_my_video_key), false); getVideoManager().setMuted(!(prefVideoEnable && prefAutomaticallyShareMyCamera)); + call.enableCamera(prefAutomaticallyShareMyCamera); startRinging(); } public void newOutgoingCall(String aTo) { @@ -712,4 +714,3 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { return AndroidCameraRecordManager.getInstance(); } } - diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index b68e45750..fbeccf64b 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -186,7 +186,8 @@ public class LinphoneService extends Service implements LinphoneCoreListener { if (DialerActivity.getDialer()!=null) { mHandler.post(new Runnable() { public void run() { - DialerActivity.getDialer().displayStatus(lc,message); + if (DialerActivity.getDialer()!=null) + DialerActivity.getDialer().displayStatus(lc,message); } }); diff --git a/submodules/linphone b/submodules/linphone index 6ff25215b..de0d399e9 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 6ff25215befafa58466eea541beae27d2d685e7f +Subproject commit de0d399e989d02f42bf70a5ebf7ab19f1762e902