code: public final void setOptionsMenuHidden(boolean optionsMenuHidden) {
          boolean invalidate = attached && hasOptionsMenu && this.optionsMenuHidden != optionsMenuHidden;
  
          this.optionsMenuHidden = optionsMenuHidden;
  
          if (invalidate) {
              router.invalidateOptionsMenu();
          }
      }
docs: Sets whether or not this controller's menu items should be visible. This is useful for hiding the
  controller's options menu items when its UI is hidden, and not just when it is detached from the
  window (the default).
  
  @param optionsMenuHidden Defaults to false. If true, this controller's menu items will not be shown.