code: final void close(boolean allMenusAreClosing) {
          if (mIsClosing) return;
  
          mIsClosing = true;
          for (WeakReference<MenuPresenter> ref : mPresenters) {
              final MenuPresenter presenter = ref.get();
              if (presenter == null) {
                  mPresenters.remove(ref);
              } else {
                  presenter.onCloseMenu(this, allMenusAreClosing);
              }
          }
          mIsClosing = false;
      }
docs: Closes the visible menu.
  
  @param allMenusAreClosing Whether the menus are completely closing (true),
  or whether there is another menu coming in this menu's place
  (false). For example, if the menu is closing because a
  sub menu is about to be shown, <var>allMenusAreClosing</var>
  is false.