diff options
Diffstat (limited to 'core/java/android/app/Activity.java')
-rw-r--r-- | core/java/android/app/Activity.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index d33c82b..9568897 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3230,7 +3230,9 @@ public class Activity extends ContextThemeWrapper * Programmatically closes the most recently opened context menu, if showing. */ public void closeContextMenu() { - mWindow.closePanel(Window.FEATURE_CONTEXT_MENU); + if (mWindow.hasFeature(Window.FEATURE_CONTEXT_MENU)) { + mWindow.closePanel(Window.FEATURE_CONTEXT_MENU); + } } /** |