Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68795557 authored by Marvin Paul's avatar Marvin Paul
Browse files

Buffer SettingsBackupAgent checksum writes

Reduce SettingsBackupAgent I/O when writing new checksum by wrapping
FileOutputStream in a BufferedOutputStream.

Bug: 18674340

Change-Id: Ia8169445d42d032e24d8a395e678295f67841a65
parent bdcb0e52
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++) {