summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-06-03 15:03:30 -0700
committerYorke Lee <yorkelee@google.com>2015-06-03 15:03:30 -0700
commiteb228df9260df0c9add5ce9d15c18383be70b55d (patch)
treeab36213f07b304965017439d034ff2b89f4a803c /InCallUI
parentd979cc3f86ce099170b15751c6893819d5546e1f (diff)
parent95a40a98cc31209c75a6d098edd6903bd15ef925 (diff)
Merge commit 'e993cb5e' into manualmerge
Change-Id: I0b50b7dc968e7d1abac1d533816bc956135adc71
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java4
-rw-r--r--InCallUI/src/com/android/incallui/Call.java3
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java4
-rw-r--r--InCallUI/src/com/android/incallui/CallUtils.java8
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallPresenter.java22
5 files changed, 19 insertions, 22 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 9decb7b21..950db3912 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -20,7 +20,7 @@ import android.content.Context;
import com.android.dialer.util.TelecomUtil;
import com.android.incallui.InCallPresenter.InCallState;
-import android.telecom.TelecomManager;
+
import android.telecom.VideoProfile;
import java.util.List;
@@ -274,7 +274,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
// Only present the user with the option to answer as a video call if the incoming call is
// a bi-directional video call.
- if (VideoProfile.VideoState.isBidirectional((call.getVideoState()))) {
+ if (VideoProfile.isBidirectional((call.getVideoState()))) {
if (withSms) {
getUi().showTargets(AnswerFragment.TARGET_SET_FOR_VIDEO_WITH_SMS);
getUi().configureMessageDialog(textMsgs);
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index ac9a46c07..77d6117ac 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -559,8 +559,7 @@ public class Call {
mChildCallIds,
getParentId(),
this.mTelecommCall.getConferenceableCalls(),
- VideoProfile.VideoState.videoStateToString(
- mTelecommCall.getDetails().getVideoState()),
+ VideoProfile.videoStateToString(mTelecommCall.getDetails().getVideoState()),
mSessionModificationState,
getVideoSettings());
}
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index a07a44794..690e824f0 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -834,8 +834,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
callStateLabel = label;
} else if (isAccount) {
callStateLabel = context.getString(R.string.incoming_via_template, label);
- } else if (VideoProfile.VideoState.isTransmissionEnabled(videoState) ||
- VideoProfile.VideoState.isReceptionEnabled(videoState)) {
+ } else if (VideoProfile.isTransmissionEnabled(videoState) ||
+ VideoProfile.isReceptionEnabled(videoState)) {
callStateLabel = context.getString(R.string.notification_incoming_video_call);
} else {
callStateLabel = context.getString(R.string.card_title_incoming_call);
diff --git a/InCallUI/src/com/android/incallui/CallUtils.java b/InCallUI/src/com/android/incallui/CallUtils.java
index 7705232c4..c69334ccf 100644
--- a/InCallUI/src/com/android/incallui/CallUtils.java
+++ b/InCallUI/src/com/android/incallui/CallUtils.java
@@ -39,8 +39,8 @@ public class CallUtils {
}
public static boolean isVideoCall(int videoState) {
- return VideoProfile.VideoState.isTransmissionEnabled(videoState)
- || VideoProfile.VideoState.isReceptionEnabled(videoState);
+ return VideoProfile.isTransmissionEnabled(videoState)
+ || VideoProfile.isReceptionEnabled(videoState);
}
public static boolean isIncomingVideoCall(Call call) {
@@ -65,7 +65,7 @@ public class CallUtils {
}
public static boolean isAudioCall(Call call) {
- return call != null && VideoProfile.VideoState.isAudioOnly(call.getVideoState());
+ return call != null && VideoProfile.isAudioOnly(call.getVideoState());
}
// TODO (ims-vt) Check if special handling is needed for CONF calls.
@@ -75,7 +75,7 @@ public class CallUtils {
public static VideoProfile makeVideoPauseProfile(Call call) {
Preconditions.checkNotNull(call);
- Preconditions.checkState(!VideoProfile.VideoState.isAudioOnly(call.getVideoState()));
+ Preconditions.checkState(!VideoProfile.isAudioOnly(call.getVideoState()));
return new VideoProfile(getPausedVideoState(call.getVideoState()));
}
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index 644c8f9b5..a27800ab9 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -17,7 +17,6 @@
package com.android.incallui;
import android.content.Context;
-import android.content.res.Configuration;
import android.database.Cursor;
import android.graphics.Point;
import android.net.Uri;
@@ -466,8 +465,8 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
Log.d(this, "checkForVideoStateChange: isVideoCall= " + isVideoCall
+ " hasVideoStateChanged=" + hasVideoStateChanged + " isVideoMode="
+ isVideoMode() + " previousVideoState: " +
- VideoProfile.VideoState.videoStateToString(mCurrentVideoState) + " newVideoState: "
- + VideoProfile.VideoState.videoStateToString(call.getVideoState()));
+ VideoProfile.videoStateToString(mCurrentVideoState) + " newVideoState: "
+ + VideoProfile.videoStateToString(call.getVideoState()));
if (!hasVideoStateChanged) {
return;
@@ -631,8 +630,8 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
private static boolean isCameraRequired(int videoState) {
- return VideoProfile.VideoState.isBidirectional(videoState) ||
- VideoProfile.VideoState.isTransmissionEnabled(videoState);
+ return VideoProfile.isBidirectional(videoState) ||
+ VideoProfile.isTransmissionEnabled(videoState);
}
private boolean isCameraRequired() {
@@ -753,10 +752,9 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
/**
- * Based on the current {@link VideoProfile.VideoState} and {@code CallState}, show or hide the
- * incoming and outgoing video surfaces. The outgoing video surface is shown any time video
- * is transmitting. The incoming video surface is shown whenever the video is un-paused and
- * active.
+ * Based on the current video state and call state, show or hide the incoming and
+ * outgoing video surfaces. The outgoing video surface is shown any time video is transmitting.
+ * The incoming video surface is shown whenever the video is un-paused and active.
*
* @param videoState The video state.
* @param callState The call state.
@@ -782,7 +780,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
InCallPresenter.getInstance().enableScreenTimeout(
- VideoProfile.VideoState.isAudioOnly(videoState));
+ VideoProfile.isAudioOnly(videoState));
}
/**
@@ -1219,8 +1217,8 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
private static int toCameraDirection(int videoState) {
- return VideoProfile.VideoState.isTransmissionEnabled(videoState) &&
- !VideoProfile.VideoState.isBidirectional(videoState)
+ return VideoProfile.isTransmissionEnabled(videoState) &&
+ !VideoProfile.isBidirectional(videoState)
? Call.VideoSettings.CAMERA_DIRECTION_BACK_FACING
: Call.VideoSettings.CAMERA_DIRECTION_FRONT_FACING;
}