docs: @Override
      public void onPrepareSubMenu(SubMenu subMenu) {
          subMenu.clear();
          if (DEBUG) {
              Log.v(TAG, "onPrepareSubMenu() mDefaultLength=" + mDefaultLength + " mShareTargets.size()=" + mShareTargets.size());
          }
          int length = Math.min(mDefaultLength, mShareTargets.size());
          Resources res = mContext.getResources();
          for (int i = 0; i < length; i++) {
              ShareTarget target = mShareTargets.get(i);
              subMenu.add(0, i, i, target.title).setIcon(target.icon).setOnMenuItemClickListener(this);
          }
  
          if (mDefaultLength < mShareTargets.size()) {
              subMenu = subMenu.addSubMenu(Menu.NONE, mDefaultLength, mDefaultLength, mExpandLabel);
  
              for (int i = 0; i < mShareTargets.size(); i++) {
                  ShareTarget target = mShareTargets.get(i);
                  subMenu.add(0, i, i, target.title).setIcon(target.icon).setOnMenuItemClickListener(this);
              }
          }
      }