diff --git a/api/current.xml b/api/current.xml
index 87f25ef22260a..d429592251e7a 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -24636,7 +24636,7 @@
deprecated="not deprecated"
visibility="public"
>
-
-
-
-A context mode's lifecycle is as follows:
*
- * - {@link Callback#onCreateContextMode(ContextualMode, Menu)} once on initial
+ *
- {@link Callback#onCreateContextualMode(ContextualMode, Menu)} once on initial
* creation
- * - {@link Callback#onPrepareContextMode(ContextualMode, Menu)} after creation
+ *
- {@link Callback#onPrepareContextualMode(ContextualMode, Menu)} after creation
* and any time the {@link ContextualMode} is invalidated
- * - {@link Callback#onContextItemClicked(ContextualMode, MenuItem)} any time a
+ *
- {@link Callback#onContextualItemClicked(ContextualMode, MenuItem)} any time a
* contextual action button is clicked
- * - {@link Callback#onDestroyContextMode(ContextualMode)} when the context mode
+ *
- {@link Callback#onDestroyContextualMode(ContextualMode)} when the context mode
* is closed
*
*/
public interface Callback {
/**
- * Called when a context mode is first created. The menu supplied will be used to generate
- * action buttons for the context mode.
+ * Called when a contextual mode is first created. The menu supplied will be used to
+ * generate action buttons for the contextual mode.
*
- * @param mode ContextMode being created
+ * @param mode ContextualMode being created
* @param menu Menu used to populate contextual action buttons
- * @return true if the context mode should be created, false if entering this context mode
- * should be aborted.
+ * @return true if the contextual mode should be created, false if entering this
+ * mode should be aborted.
*/
- public boolean onCreateContextMode(ContextualMode mode, Menu menu);
+ public boolean onCreateContextualMode(ContextualMode mode, Menu menu);
/**
- * Called to refresh a context mode's action menu whenever it is invalidated.
+ * Called to refresh a contextual mode's action menu whenever it is invalidated.
*
- * @param mode ContextMode being prepared
+ * @param mode ContextualMode being prepared
* @param menu Menu used to populate contextual action buttons
- * @return true if the menu or context mode was updated, false otherwise.
+ * @return true if the menu or contextual mode was updated, false otherwise.
*/
- public boolean onPrepareContextMode(ContextualMode mode, Menu menu);
+ public boolean onPrepareContextualMode(ContextualMode mode, Menu menu);
/**
* Called to report a user click on a contextual action button.
*
- * @param mode The current ContextMode
+ * @param mode The current ContextualMode
* @param item The item that was clicked
* @return true if this callback handled the event, false if the standard MenuItem
* invocation should continue.
*/
- public boolean onContextItemClicked(ContextualMode mode, MenuItem item);
+ public boolean onContextualItemClicked(ContextualMode mode, MenuItem item);
/**
- * Called when a context mode is about to be exited and destroyed.
+ * Called when a contextual mode is about to be exited and destroyed.
*
- * @param mode The current ContextMode being destroyed
+ * @param mode The current ContextualMode being destroyed
*/
- public void onDestroyContextMode(ContextualMode mode);
+ public void onDestroyContextualMode(ContextualMode mode);
}
}
\ No newline at end of file
diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java
index 992fdee5e839b..409edf99abf94 100644
--- a/core/java/com/android/internal/app/ActionBarImpl.java
+++ b/core/java/com/android/internal/app/ActionBarImpl.java
@@ -240,7 +240,7 @@ public class ActionBarImpl extends ActionBar {
}
ContextMode mode = new ContextMode(callback);
- if (callback.onCreateContextMode(mode, mode.getMenu())) {
+ if (callback.onCreateContextualMode(mode, mode.getMenu())) {
mode.invalidate();
mUpperContextView.initForMode(mode);
mAnimatorView.setDisplayedChild(CONTEXT_VIEW);
@@ -383,7 +383,7 @@ public class ActionBarImpl extends ActionBar {
@Override
public void finish() {
- mCallback.onDestroyContextMode(this);
+ mCallback.onDestroyContextualMode(this);
mAnimatorView.setDisplayedChild(NORMAL_VIEW);
// Clear out the context mode views after the animation finishes
@@ -399,7 +399,7 @@ public class ActionBarImpl extends ActionBar {
@Override
public void invalidate() {
- if (mCallback.onPrepareContextMode(this, mMenu)) {
+ if (mCallback.onPrepareContextualMode(this, mMenu)) {
// Refresh content in both context views
}
}
@@ -436,7 +436,7 @@ public class ActionBarImpl extends ActionBar {
}
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
- return mCallback.onContextItemClicked(this, item);
+ return mCallback.onContextualItemClicked(this, item);
}
public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {