From b5e0cfb24efded1e200989b5b48d49ac144c7704 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 7 Apr 2015 16:10:51 -0700 Subject: [PATCH] Cleanup of Video Call pause functionality. Whether the paused videoState is available is dependent on the carrier's implementation of the VT spec. The original VT implementation assumed that this was stored in a system property accessed via InCall; these CLs move this to a Call/Connection capability which will ultimately support multisim video capable devices. - Added new connection/call capabilities. Bug: 16680364 Bug: 19820114 Change-Id: I3840f92270100811161120dffcfe297bef7c4ea2 --- telecomm/java/android/telecom/Call.java | 16 +++++++++++++--- telecomm/java/android/telecom/Connection.java | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 2d2c246ac44df..5c891dc2575bc 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -221,14 +221,21 @@ public final class Call { */ public static final int CAPABILITY_SPEED_UP_MT_AUDIO = 0x00040000; - /** - * Call type can be modified for IMS call + /** + * Call can be upgraded to a video call. * @hide */ public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 0x00080000; + /** + * For video calls, indicates whether the outgoing video for the call can be paused using + * the {@link android.telecom.VideoProfile.VideoState#PAUSED} VideoState. + * @hide + */ + public static final int CAPABILITY_CAN_PAUSE_VIDEO = 0x00100000; + //****************************************************************************************** - // Next CAPABILITY value: 0x00100000 + // Next CAPABILITY value: 0x00200000 //****************************************************************************************** private final Uri mHandle; @@ -335,6 +342,9 @@ public final class Call { if (can(capabilities, CAPABILITY_CAN_UPGRADE_TO_VIDEO)) { builder.append(" CAPABILITY_CAN_UPGRADE_TO_VIDEO"); } + if (can(capabilities, CAPABILITY_CAN_PAUSE_VIDEO)) { + builder.append(" CAPABILITY_CAN_PAUSE_VIDEO"); + } builder.append("]"); return builder.toString(); } diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index c34b080340894..26f5043367942 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -187,13 +187,20 @@ public abstract class Connection implements IConferenceable { public static final int CAPABILITY_SPEED_UP_MT_AUDIO = 0x00040000; /** - * Call type can be modified for IMS call + * Call can be upgraded to a video call. * @hide */ public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 0x00080000; + /** + * For video calls, indicates whether the outgoing video for the call can be paused using + * the {@link android.telecom.VideoProfile.VideoState#PAUSED} VideoState. + * @hide + */ + public static final int CAPABILITY_CAN_PAUSE_VIDEO = 0x00100000; + //********************************************************************************************** - // Next CAPABILITY value: 0x00100000 + // Next CAPABILITY value: 0x00200000 //********************************************************************************************** /** @@ -345,6 +352,9 @@ public abstract class Connection implements IConferenceable { if (can(capabilities, CAPABILITY_CAN_UPGRADE_TO_VIDEO)) { builder.append(" CAPABILITY_CAN_UPGRADE_TO_VIDEO"); } + if (can(capabilities, CAPABILITY_CAN_PAUSE_VIDEO)) { + builder.append(" CAPABILITY_CAN_PAUSE_VIDEO"); + } builder.append("]"); return builder.toString(); }