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

Commit cc530882 authored by Haoyu Zhang's avatar Haoyu Zhang
Browse files

Fix: TextBoundsInfoResult constructor should be @Nullable

Bug: 266177479
Test: atest TextBoundsInfoTest
Change-Id: I5d30715882f142a79f5213195a1985a4036f357d
parent a428d82f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55257,7 +55257,7 @@ package android.view.inputmethod {
  public final class TextBoundsInfoResult {
    ctor public TextBoundsInfoResult(int);
    ctor public TextBoundsInfoResult(int, @NonNull android.view.inputmethod.TextBoundsInfo);
    ctor public TextBoundsInfoResult(int, @Nullable android.view.inputmethod.TextBoundsInfo);
    method public int getResultCode();
    method @Nullable public android.view.inputmethod.TextBoundsInfo getTextBoundsInfo();
    field public static final int CODE_CANCELLED = 3; // 0x3
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package android.view.inputmethod;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.RectF;

@@ -98,7 +97,7 @@ public final class TextBoundsInfoResult {
     * is null.
     */
    public TextBoundsInfoResult(@ResultCode int resultCode,
            @NonNull TextBoundsInfo textBoundsInfo) {
            @Nullable TextBoundsInfo textBoundsInfo) {
        if (resultCode == CODE_SUCCESS && textBoundsInfo == null) {
            throw new IllegalStateException("TextBoundsInfo must be provided when the resultCode "
                    + "is CODE_SUCCESS.");