docs: public final void setHasOptionsMenu(boolean hasOptionsMenu) {
          boolean invalidate = attached && !optionsMenuHidden && this.hasOptionsMenu != hasOptionsMenu;
  
          this.hasOptionsMenu = hasOptionsMenu;
  
          if (invalidate) {
              router.invalidateOptionsMenu();
          }
      }