Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef09701a authored by Evan Chen's avatar Evan Chen
Browse files

Limits the display name to 1024 characters

Bug: 418773283
Test: cts
Flag: EXEMPT bugfix
Change-Id: I29e050c498e813e291af213ce4ddc590559c8b7d
Merged-In: I29e050c498e813e291af213ce4ddc590559c8b7d
parent a3f5f8ab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -372,6 +372,11 @@ public final class AssociationRequest implements Parcelable {
        public Builder setDisplayName(@NonNull CharSequence displayName) {
            checkNotUsed();
            mDisplayName = requireNonNull(displayName);
            if (displayName.length() > 1024) {
                throw new IllegalArgumentException("Length of the display name must be at most "
                        + "1024 characters");
            }

            return this;
        }