Use ShareMyCamera settings when video call
This commit is contained in:
parent
9991f9b249
commit
b726a7b0c8
3 changed files with 17 additions and 3 deletions
|
@ -115,6 +115,7 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
}
|
||||
setContentView(R.layout.incall_layout);
|
||||
instance = this;
|
||||
LinphoneManager.getInstance().setVideoInitiator(false);
|
||||
|
||||
mAllowTransfers = getResources().getBoolean(R.bool.allow_transfers);
|
||||
|
||||
|
@ -217,7 +218,6 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
}
|
||||
|
||||
@Override
|
||||
//FIXME : Store texts into resources
|
||||
protected Dialog onCreateDialog(final int id) {
|
||||
switch (id) {
|
||||
case promptVideoId:
|
||||
|
|
|
@ -136,6 +136,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
private String lastLcStatusMessage;
|
||||
private String basePath;
|
||||
private static boolean sExited;
|
||||
private boolean videoInitiator = false;
|
||||
|
||||
private WakeLock mIncallWakeLock;
|
||||
|
||||
|
@ -148,6 +149,14 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
public static void removeListener(LinphoneSimpleListener listener) {
|
||||
simpleListeners.remove(listener);
|
||||
}
|
||||
|
||||
public boolean isVideoInitiator() {
|
||||
return videoInitiator;
|
||||
}
|
||||
|
||||
public void setVideoInitiator(boolean b) {
|
||||
videoInitiator = b;
|
||||
}
|
||||
|
||||
|
||||
private LinphoneManager(final Context c, LinphoneServiceListener listener) {
|
||||
|
@ -1155,6 +1164,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
public boolean addVideo() {
|
||||
LinphoneCall call = mLc.getCurrentCall();
|
||||
enableCamera(call, true);
|
||||
setVideoInitiator(true);
|
||||
return reinviteWithVideo();
|
||||
}
|
||||
|
||||
|
|
|
@ -106,12 +106,16 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh
|
|||
});
|
||||
|
||||
androidVideoWindowImpl.init();
|
||||
|
||||
|
||||
videoCall = LinphoneManager.getLc().getCurrentCall();
|
||||
if (videoCall != null) {
|
||||
LinphoneManager lm = LinphoneManager.getInstance();
|
||||
if (!lm.shareMyCamera() && !lm.isVideoInitiator() && videoCall.cameraEnabled()) {
|
||||
lm.sendStaticImage(true);
|
||||
}
|
||||
|
||||
updatePreview(videoCall.cameraEnabled());
|
||||
}
|
||||
|
||||
|
||||
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
|
||||
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG);
|
||||
|
|
Loading…
Reference in a new issue