Fix: TextBoundsInfoResult constructor should be @Nullable
Bug: 266177479 Test: atest TextBoundsInfoTest Change-Id: I5d30715882f142a79f5213195a1985a4036f357d
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user