code: private void persistHistoricalData() {
          synchronized (mInstanceLock) {
              if (!mReadShareHistoryCalled) {
                  throw new IllegalStateException("No preceding call to #readHistoricalData");
              }
              if (!mHistoricalRecordsChanged) {
                  return;
              }
              mHistoricalRecordsChanged = false;
              mCanReadHistoricalData = true;
              if (!TextUtils.isEmpty(mHistoryFileName)) {
                  /*AsyncTask.*/SERIAL_EXECUTOR.execute(new HistoryPersister());
              }
          }
      }
docs: Persists the history data to the backing file if the latter
  was provided. Calling this method before a call to {@link #readHistoricalData()}
  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 #readHistoricalData()}.