diff options
author | Andrew Lee <anwlee@google.com> | 2014-07-29 20:51:00 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-29 20:51:00 +0000 |
commit | 12449c95df79f57b7f94cdc521e45282b03a65e4 (patch) | |
tree | dfb5be2be93c7bb62e2812e2fd95944353664495 | |
parent | 28e3d9b950ad044b65a85b660f055303fd26e66e (diff) | |
parent | fd7edabd55dddf77240968f34996bb91152cb094 (diff) | |
download | android_packages_apps_InCallUI-12449c95df79f57b7f94cdc521e45282b03a65e4.tar.gz android_packages_apps_InCallUI-12449c95df79f57b7f94cdc521e45282b03a65e4.tar.bz2 android_packages_apps_InCallUI-12449c95df79f57b7f94cdc521e45282b03a65e4.zip |
am fd7edabd: am c12a4e97: am 7fc00318: Merge "Update VideoCallProfile.VideoState references." into lmp-dev
* commit 'fd7edabd55dddf77240968f34996bb91152cb094':
Update VideoCallProfile.VideoState references.
-rw-r--r-- | src/com/android/incallui/Call.java | 4 | ||||
-rw-r--r-- | src/com/android/incallui/CallButtonPresenter.java | 8 | ||||
-rw-r--r-- | src/com/android/incallui/GlowPadWrapper.java | 4 | ||||
-rw-r--r-- | src/com/android/incallui/InCallApp.java | 6 | ||||
-rw-r--r-- | src/com/android/incallui/InCallPresenter.java | 2 | ||||
-rw-r--r-- | src/com/android/incallui/InCallVideoCallListener.java | 8 |
6 files changed, 15 insertions, 17 deletions
diff --git a/src/com/android/incallui/Call.java b/src/com/android/incallui/Call.java index a11703a4..f145bfde 100644 --- a/src/com/android/incallui/Call.java +++ b/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/src/com/android/incallui/CallButtonPresenter.java b/src/com/android/incallui/CallButtonPresenter.java index c0e8cd55..f91cc403 100644 --- a/src/com/android/incallui/CallButtonPresenter.java +++ b/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/src/com/android/incallui/GlowPadWrapper.java b/src/com/android/incallui/GlowPadWrapper.java index 77e07449..859cd64b 100644 --- a/src/com/android/incallui/GlowPadWrapper.java +++ b/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/src/com/android/incallui/InCallApp.java b/src/com/android/incallui/InCallApp.java index 0894fb45..c7bb4fb2 100644 --- a/src/com/android/incallui/InCallApp.java +++ b/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/src/com/android/incallui/InCallPresenter.java b/src/com/android/incallui/InCallPresenter.java index 3a8dc43b..14216bea 100644 --- a/src/com/android/incallui/InCallPresenter.java +++ b/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/src/com/android/incallui/InCallVideoCallListener.java b/src/com/android/incallui/InCallVideoCallListener.java index e1fe60ab..ef9d08a8 100644 --- a/src/com/android/incallui/InCallVideoCallListener.java +++ b/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) { |