diff --git a/res/layout-xlarge-land/dialer.xml b/res/layout-xlarge-land/dialer.xml
deleted file mode 100644
index 725839d8d..000000000
--- a/res/layout-xlarge-land/dialer.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-xlarge-land/incall_layout.xml b/res/layout-xlarge-land/incall_layout.xml
deleted file mode 100644
index 5c69a2997..000000000
--- a/res/layout-xlarge-land/incall_layout.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/res/layout-xlarge/videocall.xml b/res/layout-xlarge/videocall.xml
new file mode 100755
index 000000000..3dd4f2228
--- /dev/null
+++ b/res/layout-xlarge/videocall.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/org/linphone/IncallActivity.java b/src/org/linphone/IncallActivity.java
index 6762ab7ca..216e5da25 100644
--- a/src/org/linphone/IncallActivity.java
+++ b/src/org/linphone/IncallActivity.java
@@ -42,6 +42,7 @@ import org.linphone.ui.Numpad;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -109,18 +110,13 @@ public class IncallActivity extends AbstractCalleesActivity implements
private View mConferenceVirtualCallee;
private int mMultipleCallsLimit;
private boolean mAllowTransfers;
-
- private boolean isXLargeScreen()
- {
- return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
- }
@Override
protected void onCreate(Bundle savedInstanceState) {
if (finishIfAutoRestartAfterACrash(savedInstanceState)) {
return;
}
- if (!isXLargeScreen())
+ if (!Version.isXLargeScreen(this))
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.incall_layout);
@@ -665,7 +661,7 @@ public class IncallActivity extends AbstractCalleesActivity implements
@Override
public void onConfigurationChanged(Configuration newConfig)
{
- if (!isXLargeScreen())
+ if (!Version.isXLargeScreen(this))
{
// Do nothing to not recreate the activity on smartphone if screen is rotated
super.onConfigurationChanged(null);
diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java
index 6108b2d71..fbdc94158 100755
--- a/src/org/linphone/VideoCallActivity.java
+++ b/src/org/linphone/VideoCallActivity.java
@@ -22,8 +22,9 @@ package org.linphone;
import org.linphone.LinphoneSimpleListener.LinphoneOnCallStateChangedListener;
import org.linphone.core.LinphoneCall;
-import org.linphone.core.Log;
import org.linphone.core.LinphoneCall.State;
+import org.linphone.core.Log;
+import org.linphone.mediastream.Version;
import org.linphone.mediastream.video.AndroidVideoWindowImpl;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
@@ -35,14 +36,19 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
+import android.view.Display;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
+import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
+import android.view.WindowManager;
import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.RelativeLayout.LayoutParams;
/**
* For Android SDK >= 5
@@ -121,7 +127,6 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG);
mWakeLock.acquire();
-
}
void updateQualityOfSignalIcon(float quality)
@@ -321,7 +326,33 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh
}
}
+ private void resizePreview() {
+ Display display = ((WindowManager) mVideoCaptureViewReady.getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
+ int rotation = display.getRotation();
+ LayoutParams params;
+
+ int w, h;
+ if (Version.isXLargeScreen(this)) {
+ w = 176;
+ h = 148;
+ } else {
+ w = 88;
+ h = 74;
+ }
+
+ if (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270) {
+ params = new LayoutParams(h, w);
+ } else {
+ params = new LayoutParams(w, h);
+ }
+ params.setMargins(0, 0, 15, 15);
+ params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
+ params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
+ mVideoCaptureViewReady.setLayoutParams(params);
+ }
+
public void onConfigurationChanged(Configuration newConfig) {
+ resizePreview();
super.onConfigurationChanged(null);
}
}
diff --git a/submodules/linphone b/submodules/linphone
index cc40a4f2a..06968d9ad 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit cc40a4f2a7f6fc6eab689208804868d836ddcd8e
+Subproject commit 06968d9ad3849676847c678568f8fde125084cdd