diff options
author | Tyler Gunn <tgunn@google.com> | 2015-06-03 18:48:09 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-03 18:48:09 +0000 |
commit | 95a40a98cc31209c75a6d098edd6903bd15ef925 (patch) | |
tree | 871ee79bb579023a579b167cecd87f05a0254032 | |
parent | 5dbfdb9324951a6cf3dd1490089d6b8f778df08b (diff) | |
parent | 160f19bd0ebbe4b6499c56f5bab9e21e3542ce2a (diff) |
am 669a5463: am d5e22d1f: Merge "API Cleanup: Remove references to VideoState." into mnc-dev
* commit '669a5463e7a68df4a5aabaf29a3a659023ce609a':
API Cleanup: Remove references to VideoState.
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; } |