summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Activity.java4
-rw-r--r--core/java/android/view/MenuInflater.java4
-rw-r--r--core/java/android/view/Window.java7
3 files changed, 12 insertions, 3 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 142c325..9beaec0 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4080,13 +4080,13 @@ public class Activity extends ContextThemeWrapper
*
* @see ActionMode
*/
- public ActionMode startContextMode(ActionMode.Callback callback) {
+ public ActionMode startActionMode(ActionMode.Callback callback) {
return mWindow.getDecorView().startActionMode(callback);
}
public ActionMode onStartActionMode(ActionMode.Callback callback) {
if (mActionBar != null) {
- return mActionBar.startContextMode(callback);
+ return mActionBar.startActionMode(callback);
}
return null;
}
diff --git a/core/java/android/view/MenuInflater.java b/core/java/android/view/MenuInflater.java
index 4a966b5..a959e0d 100644
--- a/core/java/android/view/MenuInflater.java
+++ b/core/java/android/view/MenuInflater.java
@@ -350,6 +350,10 @@ public class MenuInflater {
.setShowAsAction(itemShowAsAction);
if (itemListenerMethodName != null) {
+ if (mContext.isRestricted()) {
+ throw new IllegalStateException("The android:onClick attribute cannot "
+ + "be used within a restricted context");
+ }
item.setOnMenuItemClickListener(
new InflatedOnMenuItemClickListener(mContext, itemListenerMethodName));
}
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index b077b56..0d4e84b 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -62,7 +62,12 @@ public abstract class Window {
* replaces the title bar and provides an alternate location
* for an on-screen menu button on some devices.
*/
- public static final int FEATURE_ACTION_BAR = 9;
+ public static final int FEATURE_ACTION_BAR = 8;
+ /**
+ * Flag for specifying the behavior of action modes when an Action Bar is not present.
+ * If overlay is enabled, the action mode UI will be allowed to cover existing window content.
+ */
+ public static final int FEATURE_ACTION_MODE_OVERLAY = 9;
/** Flag for setting the progress bar's visibility to VISIBLE */
public static final int PROGRESS_VISIBILITY_ON = -1;
/** Flag for setting the progress bar's visibility to GONE */