Merge "Adds explanation of MessagingStyle fields" into tm-dev am: d7356c9e08 am: 9d1e6d5493

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18008166

Change-Id: I614e27a6d39156610264e2ccfe9a06ab591d0c9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alexander Roederer
2022-05-05 17:40:02 +00:00
committed by Automerger Merge Worker

View File

@@ -7770,10 +7770,11 @@ public class Notification implements Parcelable
* user will always see the normal notification view.
*
* <p>
* If the app is targeting Android P and above, it is required to use the {@link Person}
* class in order to get an optimal rendering of the notification and its avatars. For
* conversations involving multiple people, the app should also make sure that it marks the
* conversation as a group with {@link #setGroupConversation(boolean)}.
* If the app is targeting Android {@link android.os.Build.VERSION_CODES#P} and above, it is
* required to use the {@link Person} class in order to get an optimal rendering of the
* notification and its avatars. For conversations involving multiple people, the app should
* also make sure that it marks the conversation as a group with
* {@link #setGroupConversation(boolean)}.
*
* <p>
* This class is a "rebuilder": It attaches to a Builder object and modifies its behavior.
@@ -7846,8 +7847,8 @@ public class Notification implements Parcelable
* @param user Required - The person displayed for any messages that are sent by the
* user. Any messages added with {@link #addMessage(Notification.MessagingStyle.Message)}
* who don't have a Person associated with it will be displayed as if they were sent
* by this user. The user also needs to have a valid name associated with it, which will
* be enforced starting in Android P.
* by this user. The user also needs to have a valid name associated with it, which is
* enforced starting in Android {@link android.os.Build.VERSION_CODES#P}.
*/
public MessagingStyle(@NonNull Person user) {
mUser = user;
@@ -7904,9 +7905,9 @@ public class Notification implements Parcelable
/**
* Sets the title to be displayed on this conversation. May be set to {@code null}.
*
* <p>Starting in {@link Build.VERSION_CODES#R, this conversation title will be ignored if a
* valid shortcutId is added via {@link Notification.Builder#setShortcutId(String)}. In this
* case, {@link ShortcutInfo#getLongLabel()} (or, if missing,
* <p>Starting in {@link Build.VERSION_CODES#R}, this conversation title will be ignored
* if a valid shortcutId is added via {@link Notification.Builder#setShortcutId(String)}.
* In this case, {@link ShortcutInfo#getLongLabel()} (or, if missing,
* {@link ShortcutInfo#getShortLabel()}) will be shown as the conversation title
* instead.
*
@@ -8065,7 +8066,7 @@ public class Notification implements Parcelable
}
/**
* Gets the list of {@code Message} objects that represent the notification
* Gets the list of {@code Message} objects that represent the notification.
*/
public List<Message> getMessages() {
return mMessages;