Updates documentation for MessagingStyle constructor
MessagingStyle expects the field userReplyName to be non-null, but the
documentation doesn't describe it as such. This updates the documentation
to say the field is required, and adds a NonNull annotation.
This has no behavior changes.
BUG:31747744
Change-Id: I9d7755bbb365fe7f940ebb1da77c3bed1f5a247b
diff --git a/compat/java/android/support/v4/app/NotificationCompat.java b/compat/java/android/support/v4/app/NotificationCompat.java
index e2976c2..4409f92 100644
--- a/compat/java/android/support/v4/app/NotificationCompat.java
+++ b/compat/java/android/support/v4/app/NotificationCompat.java
@@ -28,6 +28,7 @@
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.ColorInt;
+import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.support.v4.os.BuildCompat;
import android.support.v4.view.GravityCompat;
@@ -2049,12 +2050,12 @@
}
/**
- * @param userDisplayName the name to be displayed for any replies sent by the user before the
- * posting app reposts the notification with those messages after they've been actually
- * sent and in previous messages sent by the user added in
+ * @param userDisplayName Required - the name to be displayed for any replies sent by the
+ * user before the posting app reposts the notification with those messages after they've
+ * been actually sent and in previous messages sent by the user added in
* {@link #addMessage(Message)}
*/
- public MessagingStyle(CharSequence userDisplayName) {
+ public MessagingStyle(@NonNull CharSequence userDisplayName) {
mUserDisplayName = userDisplayName;
}