@SuppressLint("RestrictedApi")
    private static void tintMenuIcons(final Menu menu, final int actionBarColor, final int menuColor) {
        for (int i = 0; i < menu.size(); i++) {
            final MenuItemImpl item = (MenuItemImpl) menu.getItem(i);
            final Drawable drw = item.getIcon();
            if (null != drw) {
                drw.mutate().setTint(item.isActionButton() ? actionBarColor :  menuColor);
                item.setIcon(drw);
            }
            if (null != item.getSubMenu()) {
                tintMenuIcons(item.getSubMenu(), actionBarColor, menuColor);
            }
        }
    }
Sets enabled state for given menu item (without crashing on null item)
main/src/main/java/cgeo/geocaching/utils/MenuUtils.java