code: void onItemsChanged(boolean structureChanged) {
          if (!mPreventDispatchingItemsChanged) {
              if (structureChanged) {
                  mIsVisibleItemsStale = true;
                  mIsActionItemsStale = true;
              }
  
              dispatchPresenterUpdate(structureChanged);
          } else {
              mItemsChangedWhileDispatchPrevented = true;
          }
      }
docs: Called when an item is added or removed.
  
  @param structureChanged true if the menu structure changed,
  false if only item properties changed.
  (Visibility is a structural property since it affects layout.)