From 9a365756b3610a377d643f1289905364548a9e61 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Wed, 9 Dec 2015 15:00:18 -0800 Subject: [PATCH] Add PhoneAccount capability to indicate if VT uses presence. Added new PhoneAccount capability used to indicate whether the dialer should use the presence bit in the contacts provider to determine when the video call icon is shown or not. Bug: 20257833 Change-Id: Ifb3cc5b7ff1090d539dfb925dce9f6327de15c46 --- api/current.txt | 2 ++ api/system-current.txt | 1 + api/test-current.txt | 1 + telecomm/java/android/telecom/PhoneAccount.java | 14 ++++++++++++++ 4 files changed, 18 insertions(+) diff --git a/api/current.txt b/api/current.txt index feb43da9ef718..f005465beb452 100644 --- a/api/current.txt +++ b/api/current.txt @@ -34875,6 +34875,7 @@ package android.telecom { field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10 field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4 field public static final int CAPABILITY_VIDEO_CALLING = 8; // 0x8 + field public static final int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE = 256; // 0x100 field public static final android.os.Parcelable.Creator CREATOR; field public static final java.lang.String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING = "android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING"; field public static final java.lang.String EXTRA_CALL_SUBJECT_MAX_LENGTH = "android.telecom.extra.CALL_SUBJECT_MAX_LENGTH"; @@ -64103,3 +64104,4 @@ package org.xmlpull.v1.sax2 { } } + diff --git a/api/system-current.txt b/api/system-current.txt index bc7983a0cafd3..e75a0b3088486 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -37112,6 +37112,7 @@ package android.telecom { field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10 field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4 field public static final int CAPABILITY_VIDEO_CALLING = 8; // 0x8 + field public static final int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE = 256; // 0x100 field public static final android.os.Parcelable.Creator CREATOR; field public static final java.lang.String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING = "android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING"; field public static final java.lang.String EXTRA_CALL_SUBJECT_MAX_LENGTH = "android.telecom.extra.CALL_SUBJECT_MAX_LENGTH"; diff --git a/api/test-current.txt b/api/test-current.txt index 3bcfd67ae2727..c1e1530fae54f 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -34877,6 +34877,7 @@ package android.telecom { field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10 field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4 field public static final int CAPABILITY_VIDEO_CALLING = 8; // 0x8 + field public static final int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE = 256; // 0x100 field public static final android.os.Parcelable.Creator CREATOR; field public static final java.lang.String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING = "android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING"; field public static final java.lang.String EXTRA_CALL_SUBJECT_MAX_LENGTH = "android.telecom.extra.CALL_SUBJECT_MAX_LENGTH"; diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index 5ecd2b5399359..b18af33a3a3be 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -155,6 +155,20 @@ public final class PhoneAccount implements Parcelable { */ public static final int CAPABILITY_EMERGENCY_CALLS_ONLY = 0x80; + /** + * Flag indicating that for this {@code PhoneAccount}, the ability to make a video call to a + * number relies on presence. Should only be set if the {@code PhoneAccount} also has + * {@link #CAPABILITY_VIDEO_CALLING}. + *

+ * When set, the {@link ConnectionService} is responsible for toggling the + * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE_VT_CAPABLE} bit on the + * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE} column to indicate whether + * a contact's phone number supports video calling. + *

+ * See {@link #getCapabilities} + */ + public static final int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE = 0x100; + /** * URI scheme for telephone number URIs. */