summaryrefslogtreecommitdiff
path: root/core/java/android/view/Window.java
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2010-11-15 18:58:48 -0800
committerAdam Powell <adamp@google.com>2010-11-15 20:59:29 -0800
commitdebf3bed9ea913ac55c80e1f9f7f33217054a943 (patch)
tree56e6691619d105aa0cae4088516554161981bf4a /core/java/android/view/Window.java
parent9d305170dc71cb6c070a341172e19a89a5fa8db0 (diff)
Fix bug 2948913 - provide lifecycle notifications for action modes
Change-Id: I432e29a7bddb18bc32dfbe21a8ecd7d83158e3a0
Diffstat (limited to 'core/java/android/view/Window.java')
-rw-r--r--core/java/android/view/Window.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index d5d9a2e37210..5385cd931ab6 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -313,12 +313,31 @@ public abstract class Window {
public boolean onSearchRequested();
/**
- * Called when an action mode is being started.
+ * Called when an action mode is being started for this window. Gives the
+ * callback an opportunity to handle the action mode in its own unique and
+ * beautiful way. If this method returns null the system can choose a way
+ * to present the mode or choose not to start the mode at all.
*
* @param callback Callback to control the lifecycle of this action mode
- * @return The ActionMode that was started, or null if it was canceled
+ * @return The ActionMode that was started, or null if the system should present it
*/
- public ActionMode onStartActionMode(ActionMode.Callback callback);
+ public ActionMode onWindowStartingActionMode(ActionMode.Callback callback);
+
+ /**
+ * Called when an action mode has been started. The appropriate mode callback
+ * method will have already been invoked.
+ *
+ * @param mode The new mode that has just been started.
+ */
+ public void onActionModeStarted(ActionMode mode);
+
+ /**
+ * Called when an action mode has been finished. The appropriate mode callback
+ * method will have already been invoked.
+ *
+ * @param mode The mode that was just finished.
+ */
+ public void onActionModeFinished(ActionMode mode);
}
public Window(Context context) {