/** * Reads the history data from the backing file if the latter * was provided. Calling this method more than once before a call * to {@link #persistHistoricalData()} has been made has no effect. * <p> * <strong>Note:</strong> Historical data is read asynchronously and * as soon as the reading is completed any registered * {@link DataSetObserver}s will be notified. Also no historical * data is read until this method is invoked. * <p> */ private void readHistoricalData() { synchronized (mInstanceLock) { if (!mCanReadHistoricalData || !mHistoricalRecordsChanged) { return; } mCanReadHistoricalData = false; mReadShareHistoryCalled = true; if (!TextUtils.isEmpty(mHistoryFileName)) { /*AsyncTask.*/SERIAL_EXECUTOR.execute(new HistoryLoader()); } } }
/** * Reads the history data from the backing file if the latter * was provided. Calling this method more than once before a call * to {@link #persistHistoricalData()} has been made has no effect. * <p> * <strong>Note:</strong> Historical data is read asynchronously and * as soon as the reading is completed any registered * {@link DataSetObserver}s will be notified. Also no historical * data is read until this method is invoked. * <p> */ private void readHistoricalData() { synchronized (mInstanceLock) { if (!mCanReadHistoricalData || !mHistoricalRecordsChanged) { return; } mCanReadHistoricalData = false; mReadShareHistoryCalled = true; if (!TextUtils.isEmpty(mHistoryFileName)) { /*AsyncTask.*/SERIAL_EXECUTOR.execute(new HistoryLoader()); } } }