From 0ec799805ca3681a544c5669cf73f6d0a2913535 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 22 Sep 2011 16:35:24 +0200 Subject: [PATCH] Enable/disable video according to user settings (again) --- src/org/linphone/VideoCallActivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index b57bcdb54..4a884c08c 100644 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -22,6 +22,7 @@ package org.linphone; import junit.runner.Version; +import org.linphone.core.LinphoneCall; import org.linphone.core.Log; import org.linphone.mediastream.video.AndroidVideoWindowImpl; import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration; @@ -96,7 +97,13 @@ public class VideoCallActivity extends SoftVolumeActivity { // Before creating the graph, the orientation must be known to LC => this is done here LinphoneManager.getLc().setDeviceRotation(AndroidVideoWindowImpl.rotationToAngle(getWindowManager().getDefaultDisplay().getOrientation())); - LinphoneManager.getInstance().sendStaticImage(!LinphoneManager.getInstance().shareMyCamera()); + if (LinphoneManager.getLc().isIncall()) { + LinphoneCall call = LinphoneManager.getLc().getCurrentCall(); + if (call != null) { + LinphoneManager.getInstance().sendStaticImage(!call.cameraEnabled()); + } + } + PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG);