diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-04-23 19:07:41 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-23 19:07:41 +0000 |
| commit | d1a2e3f3bc1ae2e9fa30118a65f2808e08a68d30 (patch) | |
| tree | 6f6014b053eae2a778dd70743f5d74e08f77cf92 /core/java/android | |
| parent | f60e8709adc4b08241dab78494c48d001695a515 (diff) | |
| parent | ccbfb05dd91449f632e647494b357b43542bad61 (diff) | |
Merge "Add missing javadocs" into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/people/ConversationStatus.java | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/core/java/android/app/people/ConversationStatus.java b/core/java/android/app/people/ConversationStatus.java index d351683386e2..8038158b1f97 100644 --- a/core/java/android/app/people/ConversationStatus.java +++ b/core/java/android/app/people/ConversationStatus.java @@ -142,32 +142,52 @@ public final class ConversationStatus implements Parcelable { dest.writeLong(mEndTimeMs); } + /** + * Returns the unique identifier for the status. + */ public @NonNull String getId() { return mId; } + /** + * Returns the type of activity represented by this status + */ public @ActivityType int getActivity() { return mActivity; } - public @Availability - int getAvailability() { + /** + * Returns the availability of the people behind this conversation while this activity is + * happening. + */ + public @Availability int getAvailability() { return mAvailability; } - public @Nullable - CharSequence getDescription() { + /** + * Returns the description for this activity. + */ + public @Nullable CharSequence getDescription() { return mDescription; } + /** + * Returns the image for this activity. + */ public @Nullable Icon getIcon() { return mIcon; } + /** + * Returns the time at which this status started + */ public long getStartTimeMillis() { return mStartTimeMs; } + /** + * Returns the time at which this status should be expired. + */ public long getEndTimeMillis() { return mEndTimeMs; } @@ -242,26 +262,51 @@ public final class ConversationStatus implements Parcelable { } + /** + * Sets the availability of the conversation to provide a hint about how likely + * it is that the user would receive a timely response if they sent a message. + */ public @NonNull Builder setAvailability(@Availability int availability) { mAvailability = availability; return this; } + /** + * Sets a user visible description expanding on the conversation user(s)'s activity. + * + * <p>Examples include: what media someone is watching or listening to, their approximate + * location, or what type of anniversary they are celebrating.</p> + */ public @NonNull Builder setDescription(@Nullable CharSequence description) { mDescription = description; return this; } + /** + * Sets an image representing the conversation user(s)'s activity. + * + * <p>Examples include: A still from a new story update, album art, or a map showing + * approximate location.</p> + */ public @NonNull Builder setIcon(@Nullable Icon icon) { mIcon = icon; return this; } + /** + * Sets the time at which this status became valid. + */ public @NonNull Builder setStartTimeMillis(long startTimeMs) { mStartTimeMs = startTimeMs; return this; } + /** + * Sets an expiration time for this status. + * + * <p>The system will remove the status at this time if it hasn't already been withdrawn. + * </p> + */ public @NonNull Builder setEndTimeMillis(long endTimeMs) { mEndTimeMs = endTimeMs; return this; |
