From a07f5272e030acaa13aea28a97e59b45bce4f3f9 Mon Sep 17 00:00:00 2001 From: Hyunho Date: Thu, 12 Jan 2023 04:51:20 +0000 Subject: [PATCH] Improve PublishAttributes according to the API review Changed some APIs to add description and return specific type Bug: b/264544725 Test: atest CtsTelephonyTestCases:PublishAttributesTest Change-Id: I3fbe916e6d2365ec3b11d8b17ca8518816b8400a --- .../android/telephony/ims/PublishAttributes.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/ims/PublishAttributes.java b/telephony/java/android/telephony/ims/PublishAttributes.java index c4ce6ed88a0dc..b987f1cb562d1 100644 --- a/telephony/java/android/telephony/ims/PublishAttributes.java +++ b/telephony/java/android/telephony/ims/PublishAttributes.java @@ -97,14 +97,18 @@ public final class PublishAttributes implements Parcelable { } /** + * Get the current publication state when the publishing state has changed or + * the publishing operation has done. * @return The current publication state. See {@link RcsUceAdapter.PublishState}. */ - public int getPublishState() { + public @PublishState int getPublishState() { return mPublishState; } /** - * @return The list of the {@link RcsContactPresenceTuple} sent to the server. + * Get the presence tuples from the PIDF on which the publishing was successful. + * @return The list of the {@link RcsContactPresenceTuple} sent to the server. If publish is + * not successful yet, the value is empty. */ public @NonNull List getPresenceTuples() { if (mPresenceTuples == null) { @@ -114,7 +118,9 @@ public final class PublishAttributes implements Parcelable { } /** - * @return The {@link SipDetails} received in response. + * Get the SipDetails set in ImsService. + * @return The {@link SipDetails} received in response. This value may be null if + * the device doesn't support the collection of this information. */ public @Nullable SipDetails getSipDetails() { return mSipDetails;