IMS-VT: Upgrade/Downgrade change
-Add isVideo API to VideoProfile.VideoState
Change-Id: I0b0b5cc9f59102767dc6947528838b38f18ee38e
diff --git a/telecomm/java/android/telecom/VideoProfile.java b/telecomm/java/android/telecom/VideoProfile.java
index f5cb054..3a4fc3c 100644
--- a/telecomm/java/android/telecom/VideoProfile.java
+++ b/telecomm/java/android/telecom/VideoProfile.java
@@ -181,6 +181,16 @@
}
/**
+ * Whether the video state is any of the video type
+ * @param videoState The video state.
+ * @return Returns true if the video state TX or RX or Bidirectional
+ */
+ public static boolean isVideo(int videoState) {
+ return hasState(videoState, TX_ENABLED) || hasState(videoState, RX_ENABLED)
+ || hasState(videoState, BIDIRECTIONAL);
+ }
+
+ /**
* Whether the video transmission is enabled.
* @param videoState The video state.
* @return Returns true if the video transmission is enabled.