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

Commit b2024d37 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix an issue that setMaxSuggestions(-1) throws unexpectedly" into rvc-dev am: 0fcab06f

Change-Id: I6d470b5aa89e7677e0148c2eebcd98dcac4e8a0d
parents c9af9ec0 0fcab06f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.text.SpannedString;

import com.android.internal.util.Preconditions;

import java.lang.annotation.Retention;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
@@ -491,7 +489,11 @@ public final class ConversationActions implements Parcelable {
             */
            @NonNull
            public Builder setMaxSuggestions(@IntRange(from = -1) int maxSuggestions) {
                mMaxSuggestions = Preconditions.checkArgumentNonnegative(maxSuggestions);
                if (maxSuggestions < -1) {
                    throw new IllegalArgumentException("maxSuggestions has to be greater than or "
                            + "equal to -1.");
                }
                mMaxSuggestions = maxSuggestions;
                return this;
            }