diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-22 00:13:42 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-22 00:13:42 -0800 |
commit | f1e484acb594a726fb57ad0ae4cfe902c7f35858 (patch) | |
tree | 99d2b34512f0dc2ae67666e756c1cfcd331e5fe3 /core/java/android/view/inputmethod | |
parent | 22f7dfd23490a3de2f21ff96949ba47003aac8f8 (diff) | |
download | frameworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.zip frameworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.tar.gz frameworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.tar.bz2 |
auto import from //branches/cupcake/...@127436
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; } |