Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java +18 −14 Original line number Diff line number Diff line Loading @@ -553,13 +553,7 @@ final class SettingsState { } private void doWriteState() { synchronized (mWriteLock) { if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST START]"); } AtomicFile destination = new AtomicFile(mStatePersistFile); boolean wroteState = false; final int version; final ArrayMap<String, Setting> settings; Loading @@ -570,6 +564,12 @@ final class SettingsState { mWriteScheduled = false; } synchronized (mWriteLock) { if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST START]"); } AtomicFile destination = new AtomicFile(mStatePersistFile); FileOutputStream out = null; try { out = destination.startWrite(); Loading Loading @@ -600,9 +600,7 @@ final class SettingsState { serializer.endDocument(); destination.finishWrite(out); synchronized (mLock) { addHistoricalOperationLocked(HISTORICAL_OPERATION_PERSIST, null); } wroteState = true; if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST END]"); Loading @@ -614,6 +612,12 @@ final class SettingsState { IoUtils.closeQuietly(out); } } if (wroteState) { synchronized (mLock) { addHistoricalOperationLocked(HISTORICAL_OPERATION_PERSIST, null); } } } static void writeSingleSetting(int version, XmlSerializer serializer, String id, Loading Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java +18 −14 Original line number Diff line number Diff line Loading @@ -553,13 +553,7 @@ final class SettingsState { } private void doWriteState() { synchronized (mWriteLock) { if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST START]"); } AtomicFile destination = new AtomicFile(mStatePersistFile); boolean wroteState = false; final int version; final ArrayMap<String, Setting> settings; Loading @@ -570,6 +564,12 @@ final class SettingsState { mWriteScheduled = false; } synchronized (mWriteLock) { if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST START]"); } AtomicFile destination = new AtomicFile(mStatePersistFile); FileOutputStream out = null; try { out = destination.startWrite(); Loading Loading @@ -600,9 +600,7 @@ final class SettingsState { serializer.endDocument(); destination.finishWrite(out); synchronized (mLock) { addHistoricalOperationLocked(HISTORICAL_OPERATION_PERSIST, null); } wroteState = true; if (DEBUG_PERSISTENCE) { Slog.i(LOG_TAG, "[PERSIST END]"); Loading @@ -614,6 +612,12 @@ final class SettingsState { IoUtils.closeQuietly(out); } } if (wroteState) { synchronized (mLock) { addHistoricalOperationLocked(HISTORICAL_OPERATION_PERSIST, null); } } } static void writeSingleSetting(int version, XmlSerializer serializer, String id, Loading