mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881507: NoSuchMethodError on MenuItem. [r=mfinkle]
This commit is contained in:
parent
c4b4956bc2
commit
81f9320373
@ -244,7 +244,7 @@ public class GeckoMenu extends ListView
|
||||
if (menuItem.getItemId() == id) {
|
||||
return menuItem;
|
||||
} else if (menuItem.hasSubMenu()) {
|
||||
if (menuItem.getActionProvider() == null) {
|
||||
if (!menuItem.hasActionProvider()) {
|
||||
SubMenu subMenu = menuItem.getSubMenu();
|
||||
MenuItem item = subMenu.findItem(id);
|
||||
if (item != null)
|
||||
|
@ -8,6 +8,7 @@ import org.mozilla.gecko.widget.GeckoActionProvider;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.view.ActionProvider;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.MenuItem;
|
||||
@ -70,6 +71,14 @@ public class GeckoMenuItem implements MenuItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasActionProvider() {
|
||||
if (Build.VERSION.SDK_INT < 14) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (mActionProvider != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionProvider getActionProvider() {
|
||||
return mActionProvider;
|
||||
|
Loading…
Reference in New Issue
Block a user