diff options
| author | 2022-02-15 00:57:02 +0000 | |
|---|---|---|
| committer | 2022-02-15 00:57:02 +0000 | |
| commit | c991596ab6231434120461c47bcc6179555aa99d (patch) | |
| tree | 2e0726a5b430243d30184d508f6dbd79bc9d2475 | |
| parent | 5409ef1ab7ea2138a5e22f7e0d30b837ce0c4f04 (diff) | |
| parent | cb2d34eeef58ea8c240888452e9ea5ceb2835f1e (diff) | |
Merge "Add entity uri field to Eab provider" am: cb2d34eeef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978090
Change-Id: I48abe850d9d81fe2628167b1053a34a23987a2c7
| -rw-r--r-- | core/api/current.txt | 1 | ||||
| -rw-r--r-- | core/api/system-current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 10 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/RcsContactUceCapability.java | 28 |
4 files changed, 41 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 332de71eccb1..17551f5020c7 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -40057,6 +40057,7 @@ package android.telephony { field public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL = "ims.rcs_bulk_capability_exchange_bool"; field public static final String KEY_RCS_FEATURE_TAG_ALLOWED_STRING_ARRAY = "ims.rcs_feature_tag_allowed_string_array"; field public static final String KEY_RCS_REQUIRES_PROVISIONING_BUNDLE = "ims.rcs_requires_provisioning_bundle"; + field public static final String KEY_USE_SIP_URI_FOR_PRESENCE_SUBSCRIBE_BOOL = "ims.use_sip_uri_for_presence_subscribe_bool"; field public static final String KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT = "ims.wifi_off_deferring_time_millis_int"; } diff --git a/core/api/system-current.txt b/core/api/system-current.txt index c50b9e9ad3b6..b6057e277e92 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -13289,6 +13289,7 @@ package android.telephony.ims { method @Nullable public android.telephony.ims.RcsContactPresenceTuple getCapabilityTuple(@NonNull String); method @NonNull public java.util.List<android.telephony.ims.RcsContactPresenceTuple> getCapabilityTuples(); method @NonNull public android.net.Uri getContactUri(); + method @Nullable public android.net.Uri getEntityUri(); method @NonNull public java.util.Set<java.lang.String> getFeatureTags(); method public int getRequestResult(); method public int getSourceType(); @@ -13317,6 +13318,7 @@ package android.telephony.ims { method @NonNull public android.telephony.ims.RcsContactUceCapability.PresenceBuilder addCapabilityTuple(@NonNull android.telephony.ims.RcsContactPresenceTuple); method @NonNull public android.telephony.ims.RcsContactUceCapability.PresenceBuilder addCapabilityTuples(@NonNull java.util.List<android.telephony.ims.RcsContactPresenceTuple>); method @NonNull public android.telephony.ims.RcsContactUceCapability build(); + method @NonNull public android.telephony.ims.RcsContactUceCapability.PresenceBuilder setEntityUri(@NonNull android.net.Uri); } public class RcsUceAdapter { diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index ab8867fa6cc8..ef847b6ad75d 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -4619,6 +4619,15 @@ public class CarrierConfigManager { KEY_PREFIX + "enable_presence_group_subscribe_bool"; /** + * Flag indicating whether or not to use SIP URI when send a presence subscribe. + * When {@code true}, the device sets the To and Contact header to be SIP URI using + * the TelephonyManager#getIsimDomain" API. + * If {@code false}, the device uses a TEL URI. + */ + public static final String KEY_USE_SIP_URI_FOR_PRESENCE_SUBSCRIBE_BOOL = + KEY_PREFIX + "use_sip_uri_for_presence_subscribe_bool"; + + /** * An integer key associated with the period of time in seconds the non-rcs capability * information of each contact is cached on the device. * <p> @@ -4800,6 +4809,7 @@ public class CarrierConfigManager { defaults.putBoolean(KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL, false); defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false); defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, false); + defaults.putBoolean(KEY_USE_SIP_URI_FOR_PRESENCE_SUBSCRIBE_BOOL, false); defaults.putInt(KEY_NON_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC_INT, 30 * 24 * 60 * 60); defaults.putBoolean(KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL, false); defaults.putLong(KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG, 20 * 60 * 1000); diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java index 91121187a19a..9c36db8176b9 100644 --- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java +++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java @@ -221,6 +221,15 @@ public final class RcsContactUceCapability implements Parcelable { } /** + * Set the entity URI related to the contact whose capabilities were requested. + * @param entityUri the 'pres' URL of the PRESENTITY publishing presence document. + */ + public @NonNull PresenceBuilder setEntityUri(@NonNull Uri entityUri) { + mCapabilities.mEntityUri = entityUri; + return this; + } + + /** * @return the RcsContactUceCapability instance. */ public @NonNull RcsContactUceCapability build() { @@ -232,6 +241,7 @@ public final class RcsContactUceCapability implements Parcelable { private @SourceType int mSourceType; private @CapabilityMechanism int mCapabilityMechanism; private @RequestResult int mRequestResult; + private Uri mEntityUri; private final Set<String> mFeatureTags = new HashSet<>(); private final List<RcsContactPresenceTuple> mPresenceTuples = new ArrayList<>(); @@ -248,6 +258,7 @@ public final class RcsContactUceCapability implements Parcelable { mCapabilityMechanism = in.readInt(); mSourceType = in.readInt(); mRequestResult = in.readInt(); + mEntityUri = in.readParcelable(Uri.class.getClassLoader(), android.net.Uri.class); List<String> featureTagList = new ArrayList<>(); in.readStringList(featureTagList); mFeatureTags.addAll(featureTagList); @@ -260,6 +271,7 @@ public final class RcsContactUceCapability implements Parcelable { out.writeInt(mCapabilityMechanism); out.writeInt(mSourceType); out.writeInt(mRequestResult); + out.writeParcelable(mEntityUri, flags); out.writeStringList(new ArrayList<>(mFeatureTags)); out.writeParcelableList(mPresenceTuples, flags); } @@ -361,6 +373,15 @@ public final class RcsContactUceCapability implements Parcelable { return mContactUri; } + /** + * Retrieve the entity URI of the contact whose presence information is being requested for. + * @return the URI representing the 'pres' URL of the PRESENTITY publishing presence document + * or {@code null} if the entity uri does not exist in the presence document. + */ + public @Nullable Uri getEntityUri() { + return mEntityUri; + } + @Override public String toString() { StringBuilder builder = new StringBuilder("RcsContactUceCapability"); @@ -382,6 +403,13 @@ public final class RcsContactUceCapability implements Parcelable { builder.append(mSourceType); builder.append(", requestResult="); builder.append(mRequestResult); + if (Build.IS_ENG) { + builder.append("entity uri="); + builder.append(mEntityUri != null ? mEntityUri : "null"); + } else { + builder.append("entity uri (isNull)="); + builder.append(mEntityUri != null ? "XXX" : "null"); + } if (mCapabilityMechanism == CAPABILITY_MECHANISM_PRESENCE) { builder.append(", presenceTuples={"); |