From 2c2ae557596a2942fbcba7aa9df2e0d9b1f8eb61 Mon Sep 17 00:00:00 2001 From: "James.cf Lin" Date: Wed, 19 May 2021 23:10:30 +0800 Subject: Add another OptionsBuilder constructor with the source type as one of its parameter. Bug: 187620915 Test: atest RcsUceAdapterTest ImsServiceTest Change-Id: I74c69800125f8c4a243e80ed47c5134eda8d5a78 --- .../java/android/telephony/ims/RcsContactUceCapability.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'telephony/java/android') diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java index acfa13380948..530003d6350a 100644 --- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java +++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java @@ -127,6 +127,18 @@ public final class RcsContactUceCapability implements Parcelable { SOURCE_TYPE_NETWORK); } + /** + * Create the Builder, which can be used to set UCE capabilities as well as custom + * capability extensions. + * @param contact The contact URI that the capabilities are attached to. + * @param sourceType The type where the capabilities of this contact were retrieved from. + * @hide + */ + public OptionsBuilder(@NonNull Uri contact, @SourceType int sourceType) { + mCapabilities = new RcsContactUceCapability(contact, CAPABILITY_MECHANISM_OPTIONS, + sourceType); + } + /** * Set the result of the capabilities request. * @param requestResult the request result -- cgit v1.2.3