Loading telephony/java/com/android/ims/ImsCallProfile.java +27 −10 Original line number Diff line number Diff line Loading @@ -311,22 +311,31 @@ public class ImsCallProfile implements Parcelable { * @param callType The call type. * @return The video state. */ public static int getVideoStateFromCallType(int callType) { switch (callType) { case CALL_TYPE_VT_NODIR: return VideoProfile.VideoState.PAUSED | VideoProfile.VideoState.BIDIRECTIONAL; public static int getVideoStateFromImsCallProfile(ImsCallProfile callProfile) { int videostate = VideoProfile.VideoState.AUDIO_ONLY; switch (callProfile.mCallType) { case CALL_TYPE_VT_TX: return VideoProfile.VideoState.TX_ENABLED; videostate = VideoProfile.VideoState.TX_ENABLED; break; case CALL_TYPE_VT_RX: return VideoProfile.VideoState.RX_ENABLED; videostate = VideoProfile.VideoState.RX_ENABLED; break; case CALL_TYPE_VT: return VideoProfile.VideoState.BIDIRECTIONAL; videostate = VideoProfile.VideoState.BIDIRECTIONAL; break; case CALL_TYPE_VOICE: return VideoProfile.VideoState.AUDIO_ONLY; videostate = VideoProfile.VideoState.AUDIO_ONLY; break; default: return VideoProfile.VideoState.AUDIO_ONLY; videostate = VideoProfile.VideoState.AUDIO_ONLY; break; } if (callProfile.isVideoPaused() && videostate != VideoProfile.VideoState.AUDIO_ONLY) { videostate |= VideoProfile.VideoState.PAUSED; } else { videostate &= ~VideoProfile.VideoState.PAUSED; } return videostate; } /** Loading Loading @@ -384,6 +393,14 @@ public class ImsCallProfile implements Parcelable { } } /** * Checks if video call is paused * @return true if call is video paused */ public boolean isVideoPaused() { return mMediaProfile.mVideoDirection == ImsStreamMediaProfile.DIRECTION_INACTIVE; } /** * Determines if a video state is set in a video state bit-mask. * Loading Loading
telephony/java/com/android/ims/ImsCallProfile.java +27 −10 Original line number Diff line number Diff line Loading @@ -311,22 +311,31 @@ public class ImsCallProfile implements Parcelable { * @param callType The call type. * @return The video state. */ public static int getVideoStateFromCallType(int callType) { switch (callType) { case CALL_TYPE_VT_NODIR: return VideoProfile.VideoState.PAUSED | VideoProfile.VideoState.BIDIRECTIONAL; public static int getVideoStateFromImsCallProfile(ImsCallProfile callProfile) { int videostate = VideoProfile.VideoState.AUDIO_ONLY; switch (callProfile.mCallType) { case CALL_TYPE_VT_TX: return VideoProfile.VideoState.TX_ENABLED; videostate = VideoProfile.VideoState.TX_ENABLED; break; case CALL_TYPE_VT_RX: return VideoProfile.VideoState.RX_ENABLED; videostate = VideoProfile.VideoState.RX_ENABLED; break; case CALL_TYPE_VT: return VideoProfile.VideoState.BIDIRECTIONAL; videostate = VideoProfile.VideoState.BIDIRECTIONAL; break; case CALL_TYPE_VOICE: return VideoProfile.VideoState.AUDIO_ONLY; videostate = VideoProfile.VideoState.AUDIO_ONLY; break; default: return VideoProfile.VideoState.AUDIO_ONLY; videostate = VideoProfile.VideoState.AUDIO_ONLY; break; } if (callProfile.isVideoPaused() && videostate != VideoProfile.VideoState.AUDIO_ONLY) { videostate |= VideoProfile.VideoState.PAUSED; } else { videostate &= ~VideoProfile.VideoState.PAUSED; } return videostate; } /** Loading Loading @@ -384,6 +393,14 @@ public class ImsCallProfile implements Parcelable { } } /** * Checks if video call is paused * @return true if call is video paused */ public boolean isVideoPaused() { return mMediaProfile.mVideoDirection == ImsStreamMediaProfile.DIRECTION_INACTIVE; } /** * Determines if a video state is set in a video state bit-mask. * Loading