Merge "Add the IntRange and IntDef annotations for initial text API" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4d2caded83
@@ -51681,8 +51681,8 @@ package android.view.inputmethod {
|
|||||||
method public void dump(android.util.Printer, String);
|
method public void dump(android.util.Printer, String);
|
||||||
method @Nullable public CharSequence getInitialSelectedText(int);
|
method @Nullable public CharSequence getInitialSelectedText(int);
|
||||||
method @Nullable public android.view.inputmethod.SurroundingText getInitialSurroundingText(@IntRange(from=0) int, @IntRange(from=0) int, int);
|
method @Nullable public android.view.inputmethod.SurroundingText getInitialSurroundingText(@IntRange(from=0) int, @IntRange(from=0) int, int);
|
||||||
method @Nullable public CharSequence getInitialTextAfterCursor(int, int);
|
method @Nullable public CharSequence getInitialTextAfterCursor(@IntRange(from=0) int, int);
|
||||||
method @Nullable public CharSequence getInitialTextBeforeCursor(int, int);
|
method @Nullable public CharSequence getInitialTextBeforeCursor(@IntRange(from=0) int, int);
|
||||||
method public final void makeCompatible(int);
|
method public final void makeCompatible(int);
|
||||||
method public void setInitialSurroundingSubText(@NonNull CharSequence, int);
|
method public void setInitialSurroundingSubText(@NonNull CharSequence, int);
|
||||||
method public void setInitialSurroundingText(@NonNull CharSequence);
|
method public void setInitialSurroundingText(@NonNull CharSequence);
|
||||||
|
|||||||
@@ -725,7 +725,8 @@ public class EditorInfo implements InputType, Parcelable {
|
|||||||
* protocol.
|
* protocol.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public CharSequence getInitialTextBeforeCursor(int length, int flags) {
|
public CharSequence getInitialTextBeforeCursor(
|
||||||
|
@IntRange(from = 0) int length, @InputConnection.GetTextType int flags) {
|
||||||
if (mInitialSurroundingText == null) {
|
if (mInitialSurroundingText == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -750,7 +751,7 @@ public class EditorInfo implements InputType, Parcelable {
|
|||||||
* this protocol is not supported.
|
* this protocol is not supported.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public CharSequence getInitialSelectedText(int flags) {
|
public CharSequence getInitialSelectedText(@InputConnection.GetTextType int flags) {
|
||||||
if (mInitialSurroundingText == null) {
|
if (mInitialSurroundingText == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -792,7 +793,8 @@ public class EditorInfo implements InputType, Parcelable {
|
|||||||
* protocol.
|
* protocol.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public CharSequence getInitialTextAfterCursor(int length, int flags) {
|
public CharSequence getInitialTextAfterCursor(
|
||||||
|
@IntRange(from = 0) int length, @InputConnection.GetTextType int flags) {
|
||||||
if (mInitialSurroundingText == null) {
|
if (mInitialSurroundingText == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user