summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorMatthieu Baglin <matthieu.baglin@intel.com>2015-02-25 10:18:29 +0100
committerTyler Gunn <tgunn@google.com>2015-03-10 14:53:11 -0700
commit49f2952d06c38b013513f5f9a252b3ac6c546f08 (patch)
tree61873697c3ab4922ed68b53f297a9f6b9fa059aa /InCallUI
parent7583ceb3b9f99f9af68d44f83daeb6dfbfc45811 (diff)
InCallUi basic video call fixes
This patch resolves some issues in video call establishment on L MR1 InCallUi. Change-Id: Ib72894f7e81932200b09b9995d169ef1124fc5b5 Signed-off-by: Matthieu Baglin <matthieu.baglin@intel.com>
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/Call.java8
-rw-r--r--InCallUI/src/com/android/incallui/GlowPadWrapper.java1
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallFragment.java14
3 files changed, 15 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index 663c4120a..fd06e53b3 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -371,8 +371,12 @@ public final class Call {
}
public boolean isVideoCall(Context context) {
- return CallUtil.isVideoEnabled(context) &&
- VideoProfile.VideoState.isBidirectional(getVideoState());
+ // We want to show Video call buttons even if only one direction is enabled
+ // (That is what is happening when we receive a video call for example)
+ return CallUtil.isVideoEnabled(context) && (
+ VideoProfile.VideoState.isBidirectional(getVideoState()) ||
+ VideoProfile.VideoState.isReceptionEnabled(getVideoState()) ||
+ VideoProfile.VideoState.isTransmissionEnabled(getVideoState()));
}
public void setSessionModificationState(int state) {
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
index 47547125b..b50fdd8c2 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -124,6 +124,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger
mTargetTriggered = true;
break;
case R.drawable.ic_videocam:
+ case R.drawable.ic_lockscreen_answer_video:
mAnswerListener.onAnswer(VideoProfile.VideoState.BIDIRECTIONAL, getContext());
mTargetTriggered = true;
break;
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java
index 0b5bb4b23..7859a17bc 100644
--- a/InCallUI/src/com/android/incallui/VideoCallFragment.java
+++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java
@@ -164,7 +164,7 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter,
// orientation change.
if (mSavedSurfaceTexture == null) {
mSavedSurfaceTexture = surfaceTexture;
- surfaceCreated = createSurface();
+ surfaceCreated = createSurface(width, height);
} else {
// A saved SurfaceTexture was found.
surfaceCreated = true;
@@ -266,18 +266,20 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter,
mHeight = height;
if (mSavedSurfaceTexture != null) {
- createSurface();
+ createSurface(width, height);
}
}
/**
* Creates the {@link Surface}, adjusting the {@link SurfaceTexture} buffer size.
+ * @param width The width of the surface to create.
+ * @param height The height of the surface to create.
*/
- private boolean createSurface() {
- if (mWidth != DIMENSIONS_NOT_SET && mHeight != DIMENSIONS_NOT_SET &&
- mSavedSurfaceTexture != null) {
+ private boolean createSurface(int width, int height) {
+ if (width != DIMENSIONS_NOT_SET && height != DIMENSIONS_NOT_SET
+ && mSavedSurfaceTexture != null) {
- mSavedSurfaceTexture.setDefaultBufferSize(mWidth, mHeight);
+ mSavedSurfaceTexture.setDefaultBufferSize(width, height);
mSavedSurface = new Surface(mSavedSurfaceTexture);
return true;
}