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 | |
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')
4 files changed, 45 insertions, 2 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index a6def51..6af4915 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -21,6 +21,7 @@ import android.content.res.Configuration; import android.graphics.Rect; import android.os.IBinder; import android.os.LocalPowerManager; +import android.view.animation.Animation; /** * This interface supplies all UI-specific behavior of the window manager. An @@ -247,6 +248,13 @@ public interface WindowManagerPolicy { public WindowState getAppStartingWindow(); /** + * Is this window visible? It is not visible if there is no + * surface, or we are in the process of running an exit animation + * that will remove the surface. + */ + boolean isVisibleLw(); + + /** * Is this window currently visible to the user on-screen? It is * displayed either if it is visible or it is currently running an * animation before no longer being visible. Must be called with the @@ -282,7 +290,7 @@ public interface WindowManagerPolicy { * regardless of whether the client or window manager would like * it shown. Must be called with the window manager lock held. */ - public void hideLw(); + public void hideLw(boolean doAnimation); /** * Can be called to undo the effect of {@link #hideLw}, allowing a @@ -290,7 +298,7 @@ public interface WindowManagerPolicy { * also like it to be shown. Must be called with the window manager * lock held. */ - public void showLw(); + public void showLw(boolean doAnimation); } /** No transition happening. */ 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; } |