aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsContextMenu.java7
-rw-r--r--java/org/gnu/emacs/EmacsView.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsContextMenu.java b/java/org/gnu/emacs/EmacsContextMenu.java
index c5b87aa804a..c415ba59c79 100644
--- a/java/org/gnu/emacs/EmacsContextMenu.java
+++ b/java/org/gnu/emacs/EmacsContextMenu.java
@@ -347,6 +347,13 @@ public final class EmacsContextMenu
347 Runnable runnable; 347 Runnable runnable;
348 final EmacsHolder<Boolean> rc; 348 final EmacsHolder<Boolean> rc;
349 349
350 /* Android will permanently cease to display any popup menus at
351 all if the list of menu items is empty. Prevent this by
352 promptly returning if there are no menu items. */
353
354 if (menuItems.isEmpty ())
355 return false;
356
350 rc = new EmacsHolder<Boolean> (); 357 rc = new EmacsHolder<Boolean> ();
351 rc.thing = false; 358 rc.thing = false;
352 359
diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java
index 04c3d824027..0f83af882ae 100644
--- a/java/org/gnu/emacs/EmacsView.java
+++ b/java/org/gnu/emacs/EmacsView.java
@@ -622,6 +622,13 @@ public final class EmacsView extends ViewGroup
622 if (popupActive && !force) 622 if (popupActive && !force)
623 return false; 623 return false;
624 624
625 /* Android will permanently cease to display any popup menus at
626 all if the list of menu items is empty. Prevent this by
627 promptly returning if there are no menu items. */
628
629 if (menu.menuItems.isEmpty ())
630 return false;
631
625 contextMenu = menu; 632 contextMenu = menu;
626 popupActive = true; 633 popupActive = true;
627 634