code: private void sortActivities() {
          synchronized (mInstanceLock) {
              if (mActivitySorter != null && !mActivites.isEmpty()) {
                  mActivitySorter.sort(mIntent, mActivites,
                          Collections.unmodifiableList(mHistoricalRecords));
                  notifyChanged();
              }
          }
      }
docs: Sorts the activities based on history and an intent. If
  a sorter is not specified this a default implementation is used.
  
  @see #setActivitySorter(ActivitySorter)