am fd7edabd: am c12a4e97: am 7fc00318: Merge "Update VideoCallProfile.VideoState references." into lmp-dev

* commit 'fd7edabd55dddf77240968f34996bb91152cb094':
  Update VideoCallProfile.VideoState references.
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index a11703a..f145bfd 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -332,9 +332,7 @@
     }
 
     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 c0e8cd5..f91cc40 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -219,7 +219,7 @@
         }
 
         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 @@
         }
 
         VideoCallProfile videoCallProfile =
-                new VideoCallProfile(VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL);
+                new VideoCallProfile(VideoCallProfile.VideoState.BIDIRECTIONAL);
         videoCall.sendSessionModifyRequest(videoCallProfile);
     }
 
@@ -278,12 +278,12 @@
         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 77e0744..859cd64 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -112,7 +112,7 @@
         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 @@
                 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 0894fb4..c7bb4fb 100644
--- a/InCallUI/src/com/android/incallui/InCallApp.java
+++ b/InCallUI/src/com/android/incallui/InCallApp.java
@@ -55,7 +55,7 @@
     }
 
     /**
-     * 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 @@
             // 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 3a8dc43..14216be 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -564,7 +564,7 @@
         // (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 e1fe60a..ef9d08a 100644
--- a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java
+++ b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java
@@ -50,12 +50,12 @@
         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) {