code: public void setActivitySorter(ActivitySorter activitySorter) {
          synchronized (mInstanceLock) {
              if (mActivitySorter == activitySorter) {
                  return;
              }
              mActivitySorter = activitySorter;
              if (sortActivitiesIfNeeded()) {
                  notifyChanged();
              }
          }
      }
docs: Sets the sorter for ordering activities based on historical data and an intent.
  
  @param activitySorter The sorter.
  
  @see ActivitySorter