summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-06-03 10:02:14 -0700
committerTyler Gunn <tgunn@google.com>2015-06-03 10:02:14 -0700
commit7d88effc96d2a141c3eca1195d9b77ac6bb92a43 (patch)
treeb53d0b2cfb1d89eca7e042082a4aa2d3370ca835
parentf7d3bee12729fbf8be1059de0c0278f27c4fb7e7 (diff)
API Cleanup: Remove references to VideoState.
Replace method references from VideoState to VideoProfile equivalents. Bug: 21573551 Change-Id: I3c5c55652e0dd12df97eac42f1791f8b67dbac5c
-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.java30
5 files changed, 23 insertions, 26 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 b95a54708..59ce6dd3f 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -808,8 +808,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 20f3912b4..31be7d3d3 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.
@@ -767,13 +765,13 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
Log.e(this, "showVideoUi, VideoCallUi is null returning");
return;
}
- boolean isPaused = VideoProfile.VideoState.isPaused(videoState);
+ boolean isPaused = VideoProfile.isPaused(videoState);
boolean isCallActive = callState == Call.State.ACTIVE;
- if (VideoProfile.VideoState.isBidirectional(videoState)) {
+ if (VideoProfile.isBidirectional(videoState)) {
ui.showVideoViews(true, !isPaused && isCallActive);
- } else if (VideoProfile.VideoState.isTransmissionEnabled(videoState)) {
+ } else if (VideoProfile.isTransmissionEnabled(videoState)) {
ui.showVideoViews(true, false);
- } else if (VideoProfile.VideoState.isReceptionEnabled(videoState)) {
+ } else if (VideoProfile.isReceptionEnabled(videoState)) {
ui.showVideoViews(false, !isPaused && isCallActive);
loadProfilePhotoAsync();
} else {
@@ -781,7 +779,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
InCallPresenter.getInstance().enableScreenTimeout(
- VideoProfile.VideoState.isAudioOnly(videoState));
+ VideoProfile.isAudioOnly(videoState));
}
/**
@@ -1190,8 +1188,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;
}