Loading core/java/android/view/inputmethod/BaseInputConnection.java +6 −3 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.view.KeyEvent; import android.view.OnReceiveContentListener; import android.view.View; import com.android.internal.util.Preconditions; class ComposingText implements NoCopySpan { } Loading Loading @@ -504,7 +506,7 @@ public class BaseInputConnection implements InputConnection { */ @Nullable public CharSequence getTextBeforeCursor(@IntRange(from = 0) int length, int flags) { if (length < 0) return null; Preconditions.checkArgumentNonnegative(length); final Editable content = getEditable(); if (content == null) return null; Loading Loading @@ -563,7 +565,7 @@ public class BaseInputConnection implements InputConnection { */ @Nullable public CharSequence getTextAfterCursor(@IntRange(from = 0) int length, int flags) { if (length < 0) return null; Preconditions.checkArgumentNonnegative(length); final Editable content = getEditable(); if (content == null) return null; Loading Loading @@ -600,7 +602,8 @@ public class BaseInputConnection implements InputConnection { @Nullable public SurroundingText getSurroundingText( @IntRange(from = 0) int beforeLength, @IntRange(from = 0) int afterLength, int flags) { if (beforeLength < 0 || afterLength < 0) return null; Preconditions.checkArgumentNonnegative(beforeLength); Preconditions.checkArgumentNonnegative(afterLength); final Editable content = getEditable(); if (content == null) return null; Loading Loading
core/java/android/view/inputmethod/BaseInputConnection.java +6 −3 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.view.KeyEvent; import android.view.OnReceiveContentListener; import android.view.View; import com.android.internal.util.Preconditions; class ComposingText implements NoCopySpan { } Loading Loading @@ -504,7 +506,7 @@ public class BaseInputConnection implements InputConnection { */ @Nullable public CharSequence getTextBeforeCursor(@IntRange(from = 0) int length, int flags) { if (length < 0) return null; Preconditions.checkArgumentNonnegative(length); final Editable content = getEditable(); if (content == null) return null; Loading Loading @@ -563,7 +565,7 @@ public class BaseInputConnection implements InputConnection { */ @Nullable public CharSequence getTextAfterCursor(@IntRange(from = 0) int length, int flags) { if (length < 0) return null; Preconditions.checkArgumentNonnegative(length); final Editable content = getEditable(); if (content == null) return null; Loading Loading @@ -600,7 +602,8 @@ public class BaseInputConnection implements InputConnection { @Nullable public SurroundingText getSurroundingText( @IntRange(from = 0) int beforeLength, @IntRange(from = 0) int afterLength, int flags) { if (beforeLength < 0 || afterLength < 0) return null; Preconditions.checkArgumentNonnegative(beforeLength); Preconditions.checkArgumentNonnegative(afterLength); final Editable content = getEditable(); if (content == null) return null; Loading