diff options
author | Andrew Lee <anwlee@google.com> | 2014-07-28 14:21:15 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-07-28 15:03:42 -0700 |
commit | 9f5ec9bc81bb1fe917a0ec6a5ff0b66950ffcaa4 (patch) | |
tree | 8d218a37b3f86e1bef63096f1449ca5d311a1d40 | |
parent | 6f8b826d05aae5f3e28b63890439f2a3b6511346 (diff) |
Update VideoCallProfile.VideoState references.
Bug: 16629892
Change-Id: I689b5ce4f41db109b003bd15f9cae5596a1c3819
6 files changed, 15 insertions, 17 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index a11703a49..f145bfde9 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -332,9 +332,7 @@ public final class Call { } public boolean isVideoCall() { - int videoState = getVideoState(); - return (videoState & VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL) - == VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL; + return VideoCallProfile.VideoState.isBidirectional(getVideoState()); } @Override diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index c0e8cd555..f91cc403b 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -219,7 +219,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto } VideoCallProfile videoCallProfile = new VideoCallProfile( - VideoCallProfile.VIDEO_STATE_AUDIO_ONLY, VideoCallProfile.QUALITY_DEFAULT); + VideoCallProfile.VideoState.AUDIO_ONLY, VideoCallProfile.QUALITY_DEFAULT); videoCall.sendSessionModifyRequest(videoCallProfile); } @@ -240,7 +240,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto } VideoCallProfile videoCallProfile = - new VideoCallProfile(VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); + new VideoCallProfile(VideoCallProfile.VideoState.BIDIRECTIONAL); videoCall.sendSessionModifyRequest(videoCallProfile); } @@ -278,12 +278,12 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto if (pause) { videoCall.setCamera(null); VideoCallProfile videoCallProfile = new VideoCallProfile( - mCall.getVideoState() | VideoCallProfile.VIDEO_STATE_PAUSED); + mCall.getVideoState() | VideoCallProfile.VideoState.PAUSED); videoCall.sendSessionModifyRequest(videoCallProfile); } else { videoCall.setCamera(getCameraId()); VideoCallProfile videoCallProfile = new VideoCallProfile( - mCall.getVideoState() & ~VideoCallProfile.VIDEO_STATE_PAUSED); + mCall.getVideoState() & ~VideoCallProfile.VideoState.PAUSED); videoCall.sendSessionModifyRequest(videoCallProfile); } getUi().setPauseVideoButton(pause); diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java index 77e074498..859cd64bd 100644 --- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java +++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java @@ -112,7 +112,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger final int resId = getResourceIdForTarget(target); switch (resId) { case R.drawable.ic_lockscreen_answer: - mAnswerListener.onAnswer(VideoCallProfile.VIDEO_STATE_AUDIO_ONLY); + mAnswerListener.onAnswer(VideoCallProfile.VideoState.AUDIO_ONLY); mTargetTriggered = true; break; case R.drawable.ic_lockscreen_decline: @@ -124,7 +124,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger mTargetTriggered = true; break; case R.drawable.ic_videocam: - mAnswerListener.onAnswer(VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); + mAnswerListener.onAnswer(VideoCallProfile.VideoState.BIDIRECTIONAL); mTargetTriggered = true; break; default: diff --git a/InCallUI/src/com/android/incallui/InCallApp.java b/InCallUI/src/com/android/incallui/InCallApp.java index 0894fb45a..c7bb4fb2a 100644 --- a/InCallUI/src/com/android/incallui/InCallApp.java +++ b/InCallUI/src/com/android/incallui/InCallApp.java @@ -55,7 +55,7 @@ public class InCallApp extends Application { } /** - * Accepts broadcast Intents which will be prepared by {@link StatusBarNotifier} and thus + * Accepts broadcatst Intents which will be prepared by {@link StatusBarNotifier} and thus * sent from framework's notification mechanism (which is outside Phone context). * This should be visible from outside, but shouldn't be in "exported" state. */ @@ -68,10 +68,10 @@ public class InCallApp extends Application { // TODO: Commands of this nature should exist in the CallList. if (action.equals(ACTION_ANSWER_VIDEO_INCOMING_CALL)) { InCallPresenter.getInstance().answerIncomingCall( - context, VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); + context, VideoCallProfile.VideoState.BIDIRECTIONAL); } else if (action.equals(ACTION_ANSWER_VOICE_INCOMING_CALL)) { InCallPresenter.getInstance().answerIncomingCall( - context, VideoCallProfile.VIDEO_STATE_AUDIO_ONLY); + context, VideoCallProfile.VideoState.AUDIO_ONLY); } else if (action.equals(ACTION_DECLINE_INCOMING_CALL)) { InCallPresenter.getInstance().declineIncomingCall(context); } else if (action.equals(ACTION_HANG_UP_ONGOING_CALL)) { diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 3a8dc43b6..14216bea7 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -564,7 +564,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { // (1) Attempt to answer a call if (incomingCall != null) { TelecommAdapter.getInstance().answerCall( - incomingCall.getId(), VideoCallProfile.VIDEO_STATE_AUDIO_ONLY); + incomingCall.getId(), VideoCallProfile.VideoState.AUDIO_ONLY); return true; } diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java index e1fe60ab3..ef9d08a8e 100644 --- a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java +++ b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java @@ -50,12 +50,12 @@ public class InCallVideoCallListener extends VideoCall.Listener { int newVideoState = videoCallProfile.getVideoState(); boolean wasVideoState = isVideoStateSet(previousVideoState, - VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); + VideoCallProfile.VideoState.BIDIRECTIONAL); boolean isVideoState = isVideoStateSet(newVideoState, - VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); + VideoCallProfile.VideoState.BIDIRECTIONAL); - boolean wasPaused = isVideoStateSet(previousVideoState, VideoCallProfile.VIDEO_STATE_PAUSED); - boolean isPaused = isVideoStateSet(newVideoState, VideoCallProfile.VIDEO_STATE_PAUSED); + boolean wasPaused = isVideoStateSet(previousVideoState, VideoCallProfile.VideoState.PAUSED); + boolean isPaused = isVideoStateSet(newVideoState, VideoCallProfile.VideoState.PAUSED); // Check for upgrades to video and downgrades to audio. if (!wasVideoState && isVideoState) { |