code: public Intent chooseActivity(int index)
    {
      synchronized (mInstanceLock)
      {
        if (mIntent == null)
        {
          return null;
        }
  
        ensureConsistentState();
  
        ActivityResolveInfo chosenActivity = mActivities.get(index);
  
        ComponentName chosenName = new ComponentName(chosenActivity.resolveInfo.activityInfo.packageName, chosenActivity.resolveInfo.activityInfo.name);
  
        Intent choiceIntent = new Intent(mIntent);
        choiceIntent.setComponent(chosenName);
  
        if (mActivityChoserModelPolicy != null)
        {
          // Do not allow the policy to change the intent.
          // Intent choiceIntentCopy = new Intent(choiceIntent);
          final boolean handled = mActivityChoserModelPolicy.onChooseActivity(this, choiceIntent);
          if (handled)
          {
            return null;
          }
        }
  
        HistoricalRecord historicalRecord = new HistoricalRecord(chosenName, System.currentTimeMillis(), DEFAULT_HISTORICAL_RECORD_WEIGHT);
        addHisoricalRecord(historicalRecord);
  
        return choiceIntent;
      }
    }
docs: Chooses a activity to handle the current intent. This will result in
  adding a historical record for that action and construct intent with
  its component name set such that it can be immediately started by the
  client.
  <p>
  <strong>Note:</strong> By calling this method the client guarantees
  that the returned intent will be started. This intent is returned to
  the client solely to let additional customization before the start.
  </p>
  
  @return An {@link Intent} for launching the activity or null if the
  policy has consumed the intent or there is not current intent
  set via {@link #setIntent(Intent)}.
  @see HistoricalRecord
  @see OnChooseActivityListener