code: private void setActivityChooserPolicyIfNeeded() {
          if (mOnShareTargetSelectedListener == null) {
              return;
          }
          if (mOnChooseActivityListener == null) {
              mOnChooseActivityListener = new ShareAcitivityChooserModelPolicy();
          }
          ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
          dataModel.setOnChooseActivityListener(mOnChooseActivityListener);
      }
docs: Set the activity chooser policy of the model backed by the current
  share history file if needed which is if there is a registered callback.