summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-07-29 20:45:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-29 20:45:34 +0000
commitfd7edabd55dddf77240968f34996bb91152cb094 (patch)
tree9c9a4c7de2f48c6d4df8b5d8ce3e185ff6ad80b7
parentae106bc7f91b481944fdfc2e5d4b7b822130819a (diff)
parentc12a4e9766fbf6938d569eb38aa1a5f64c4a58e6 (diff)
downloadandroid_packages_apps_InCallUI-fd7edabd55dddf77240968f34996bb91152cb094.tar.gz
android_packages_apps_InCallUI-fd7edabd55dddf77240968f34996bb91152cb094.tar.bz2
android_packages_apps_InCallUI-fd7edabd55dddf77240968f34996bb91152cb094.zip
am c12a4e97: am 7fc00318: Merge "Update VideoCallProfile.VideoState references." into lmp-dev
* commit 'c12a4e9766fbf6938d569eb38aa1a5f64c4a58e6': Update VideoCallProfile.VideoState references.
-rw-r--r--src/com/android/incallui/Call.java4
-rw-r--r--src/com/android/incallui/CallButtonPresenter.java8
-rw-r--r--src/com/android/incallui/GlowPadWrapper.java4
-rw-r--r--src/com/android/incallui/InCallApp.java6
-rw-r--r--src/com/android/incallui/InCallPresenter.java2
-rw-r--r--src/com/android/incallui/InCallVideoCallListener.java8
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) {