From 3570e970a2812b95ed82bf8e232d1e22f71f118e Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Wed, 8 Apr 2015 10:41:57 -0700 Subject: Cleanup of Video Call pause functionality. Whether the paused videoState is available is dependent on the carrier's implementation of the VT spec. The original VT implementation assumed that this was stored in a system property accessed via InCall; these CLs move this to a Call/Connection capability which will ultimately support multisim video capable devices. - Made some general cleanups in VideoPauseController (comments, some minor logic changes, renamed a few methods). - Removed access of system property to see if pause is supported and instead key in on the call capability. - Changed video call presenter to hide incoming video surface when a pause signal is received. Bug: 16680364 Bug: 19820114 Change-Id: I6d1a7789925c69e4022846f8d847b8bb1274c06b --- InCallUI/src/com/android/incallui/VideoCallPresenter.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 486a38da3..3f8a827c3 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -412,7 +412,9 @@ public class VideoCallPresenter extends Presenter Date: Wed, 8 Apr 2015 17:59:58 -0700 Subject: Show progress spinner when upgrading to video Show spinner when waiting for remote consent. Also correctly propagate sessionModification state when downgrading to audio. Bug: 20090442 Change-Id: If733ce99683436c751a26a6511e6a41bac637c30 --- InCallUI/src/com/android/incallui/VideoCallPresenter.java | 1 + 1 file changed, 1 insertion(+) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 3f8a827c3..8ee30f2b3 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -941,6 +941,7 @@ public class VideoCallPresenter extends Presenter Date: Mon, 13 Apr 2015 13:56:27 -0700 Subject: Hide incoming video until call is connected. Changing the VideoCallPresenter so that the incoming video surface is hidden until the call becomes active. This way the remote party's profile picture is shown until the call is connected. Bug: 19820114 Bug: 20153678 Change-Id: Ifb1eeab2dc92ccd54c070248bd4efb44a113fed3 --- .../com/android/incallui/VideoCallPresenter.java | 39 ++++++++++++++-------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 8ee30f2b3..1d8945f31 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -337,11 +337,11 @@ public class VideoCallPresenter extends Presenter Date: Mon, 13 Apr 2015 15:58:41 -0700 Subject: Always allow landscape mode if video call is the primary call Bug: 19995709 Change-Id: Ie21b50bf8ed34b0c50463285104e59271c94b12e --- InCallUI/src/com/android/incallui/VideoCallPresenter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 1d8945f31..d49e2cdd9 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -541,6 +541,11 @@ public class VideoCallPresenter extends Presenter Date: Mon, 13 Apr 2015 16:24:21 -0700 Subject: Fix orientation of preview surface when device rotated. - Cleaned up some unused methods in InCallActivity. - In onDeviceOrientationChanged, handle orientatoin change by resizing surface. - Fixed setPreviewSize which was not rotating the surface the appropriate way (ensured it was setting a transform on the surface, and also made sure that the correct dimensions were being passed in). Bug: 19850018 Change-Id: Ia9324ce6bad5a797839e69ba20244f2bcc44acb5 --- .../com/android/incallui/VideoCallPresenter.java | 43 ++++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) (limited to 'InCallUI/src/com/android/incallui/VideoCallPresenter.java') diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index d49e2cdd9..5bd7fbe6c 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -65,7 +65,7 @@ import android.os.SystemProperties; * When downgrading to an audio-only video state, the {@code VideoCallPresenter} nulls both * surfaces. */ -public class VideoCallPresenter extends Presenter implements +public class VideoCallPresenter extends Presenter implements IncomingCallListener, InCallOrientationListener, InCallStateListener, InCallDetailsListener, SurfaceChangeListener, VideoEventListener, InCallVideoCallListenerNotifier.SessionModificationListener { @@ -165,7 +165,6 @@ public class VideoCallPresenter extends Presenter 0 && height > 0) { aspectRatio = (float) width / (float) height; } - setPreviewSize(mDeviceOrientation, aspectRatio); - // Check if the preview surface is ready yet; if it is, set it on the {@code VideoCall}. - // If it not yet ready, it will be set when when creation completes. - if (ui.isPreviewVideoSurfaceCreated()) { - mPreviewSurfaceState = PreviewSurfaceState.SURFACE_SET; - mVideoCall.setPreviewSurface(ui.getPreviewVideoSurface()); - } + // Resize the textureview housing the preview video and rotate it appropriately based on + // the device orientation + setPreviewSize(mDeviceOrientation, aspectRatio); } /** @@ -889,8 +907,11 @@ public class VideoCallPresenter extends Presenter