code: private boolean addHisoricalRecord(HistoricalRecord historicalRecord) {
          synchronized (mInstanceLock) {
              final boolean added = mHistoricalRecords.add(historicalRecord);
              if (added) {
                  mHistoricalRecordsChanged = true;
                  pruneExcessiveHistoricalRecordsLocked();
                  persistHistoricalData();
                  sortActivities();
              }
              return added;
          }
      }
docs: Adds a historical record.
  
  @param historicalRecord The record to add.
  @return True if the record was added.