diff options
author | Marvin Paul <marvinpaul@google.com> | 2014-12-16 14:12:33 -0800 |
---|---|---|
committer | Marvin Paul <marvinpaul@google.com> | 2014-12-16 16:27:49 -0800 |
commit | 68795557234a4ccfd9e90981ad1d8391fba99270 (patch) | |
tree | 756a97d45c8cabf66385c8f86df08b07684f43e0 /packages/SettingsProvider | |
parent | bdcb0e52654ea1ec86d90e7e301490f9f4d80c5a (diff) | |
download | frameworks_base-68795557234a4ccfd9e90981ad1d8391fba99270.zip frameworks_base-68795557234a4ccfd9e90981ad1d8391fba99270.tar.gz frameworks_base-68795557234a4ccfd9e90981ad1d8391fba99270.tar.bz2 |
Buffer SettingsBackupAgent checksum writes
Reduce SettingsBackupAgent I/O when writing new checksum by wrapping
FileOutputStream in a BufferedOutputStream.
Bug: 18674340
Change-Id: Ia8169445d42d032e24d8a395e678295f67841a65
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index 78af785..d1b4812 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -580,7 +580,7 @@ public class SettingsBackupAgent extends BackupAgentHelper { private void writeNewChecksums(long[] checksums, ParcelFileDescriptor newState) throws IOException { DataOutputStream dataOutput = new DataOutputStream( - new FileOutputStream(newState.getFileDescriptor())); + new BufferedOutputStream(new FileOutputStream(newState.getFileDescriptor()))); dataOutput.writeInt(STATE_VERSION); for (int i = 0; i < STATE_SIZE; i++) { |