diff options
Diffstat (limited to 'core/java/android/view/inputmethod')
3 files changed, 35 insertions, 0 deletions
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java index 27461ff..bd7b050 100644 --- a/core/java/android/view/inputmethod/InputConnection.java +++ b/core/java/android/view/inputmethod/InputConnection.java @@ -177,6 +177,19 @@ public interface InputConnection { public boolean commitCompletion(CompletionInfo text); /** + * Tell the editor that you are starting a batch of editor operations. + * The editor will try to avoid sending you updates about its state + * until {@link #endBatchEdit} is called. + */ + public boolean beginBatchEdit(); + + /** + * Tell the editor that you are done with a batch edit previously + * initiated with {@link #endBatchEdit}. + */ + public boolean endBatchEdit(); + + /** * Send a key event to the process that is currently attached through * this input connection. The event will be dispatched like a normal * key event, to the currently focused; this generally is the view that diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java index a41955c..f65b2a1 100644 --- a/core/java/android/view/inputmethod/InputConnectionWrapper.java +++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java @@ -77,6 +77,14 @@ public class InputConnectionWrapper implements InputConnection { return mBase.commitCompletion(text); } + public boolean beginBatchEdit() { + return mBase.beginBatchEdit(); + } + + public boolean endBatchEdit() { + return mBase.endBatchEdit(); + } + public boolean sendKeyEvent(KeyEvent event) { return mBase.sendKeyEvent(event); } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index ba40782..a9a9594 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -293,6 +293,14 @@ public final class InputMethodManager { return false; } + public boolean beginBatchEdit() { + return false; + } + + public boolean endBatchEdit() { + return false; + } + public boolean commitCompletion(CompletionInfo text) { return false; } @@ -401,6 +409,12 @@ public final class InputMethodManager { }; final InputConnection mDummyInputConnection = new BaseInputConnection(this) { + public boolean beginBatchEdit() { + return false; + } + public boolean endBatchEdit() { + return false; + } public boolean commitText(CharSequence text, int newCursorPosition) { return false; } |