code: private void persistHistoricalDataIfNeeded()
    {
      if (!mReadShareHistoryCalled)
      {
        throw new IllegalStateException("No preceding call to #readHistoricalData");
      }
      if (!mHistoricalRecordsChanged)
      {
        return;
      }
      mHistoricalRecordsChanged = false;
      if (!TextUtils.isEmpty(mHistoryFileName))
      {
        AsyncTaskCompat.executeParallel(new PersistHistoryAsyncTask(), mHistoricalRecords, mHistoryFileName);
      }
    }
docs: Persists the history data to the backing file if the latter
  was provided. Calling this method before a call to {@link #readHistoricalDataIfNeeded()}
  throws an exception. Calling this method more than one without choosing an
  activity has not effect.
  
  @throws IllegalStateException If this method is called before a call to
  {@link #readHistoricalDataIfNeeded()}.