Adding "start call with video" extra for ACTION_CALL intent.
- Added extra.
- Updated Call, CallInfo, ConnectionRequest to pass extra.
Bug: 16014224
Change-Id: If213bfe8d6b8705a16bf7c3247ad3f7c5530dfe2
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 3d4771b..2810dc8 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -55,7 +55,6 @@
* connected etc).
*/
final class Call implements OutgoingCallResponse {
-
/**
* Listener for events on the call.
*/
@@ -174,6 +173,8 @@
private boolean mSpeakerphoneOn;
+ private int mVideoState;
+
/**
* Disconnect cause for the call. Only valid if the state of the call is DISCONNECTED.
* See {@link android.telephony.DisconnectCause}.
@@ -1031,4 +1032,30 @@
l.onFeaturesChanged(Call.this);
}
}
+
+ /**
+ * The current video state for the call.
+ * Valid values: {@link android.telecomm.VideoCallProfile#VIDEO_STATE_AUDIO_ONLY},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_BIDIRECTIONAL},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_TX_ENABLED},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_RX_ENABLED}.
+ *
+ * @return True if video is enabled.
+ */
+ public int getVideoState() {
+ return mVideoState;
+ }
+
+ /**
+ * At the start of the call, determines the desired video state for the call.
+ * Valid values: {@link android.telecomm.VideoCallProfile#VIDEO_STATE_AUDIO_ONLY},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_BIDIRECTIONAL},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_TX_ENABLED},
+ * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_RX_ENABLED}.
+ *
+ * @param videoState The desired video state for the call.
+ */
+ public void setVideoState(int videoState) {
+ mVideoState = videoState;
+ }
}