Add capability to determine if downgrade to audio is denied.

By default we assume downgrade to audio is permitted; this capability
probides a means for a carrier to specifically deny that.

Bug: 22728624

Change-Id: I75e0a5b9e5ad2d970003a4691b6fc0ac0dcfe9e0
This commit is contained in:
Tyler Gunn
2016-01-19 15:59:34 -08:00
parent d55ece0b38
commit f97a009f76
5 changed files with 44 additions and 3 deletions

View File

@@ -255,8 +255,23 @@ public abstract class Connection extends Conferenceable {
*/
public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 0x00400000;
/**
* When set, prevents a video call from being downgraded to an audio-only call.
* <p>
* Should be set when the VideoState has the {@link VideoProfile#STATE_TX_ENABLED} or
* {@link VideoProfile#STATE_RX_ENABLED} bits set to indicate that the connection cannot be
* downgraded from a video call back to a VideoState of
* {@link VideoProfile#STATE_AUDIO_ONLY}.
* <p>
* Intuitively, a call which can be downgraded to audio should also have local and remote
* video
* capabilities (see {@link #CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL} and
* {@link #CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL}).
*/
public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 0x00800000;
//**********************************************************************************************
// Next CAPABILITY value: 0x00800000
// Next CAPABILITY value: 0x01000000
//**********************************************************************************************
/**
@@ -371,6 +386,9 @@ public abstract class Connection extends Conferenceable {
if (can(capabilities, CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL)) {
builder.append(" CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL");
}
if (can(capabilities, CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO)) {
builder.append(" CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO");
}
if (can(capabilities, CAPABILITY_HIGH_DEF_AUDIO)) {
builder.append(" CAPABILITY_HIGH_DEF_AUDIO");
}