diff options
Diffstat (limited to 'services/java/com/android/server/RandomBlock.java')
| -rw-r--r-- | services/java/com/android/server/RandomBlock.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/RandomBlock.java b/services/java/com/android/server/RandomBlock.java index cc22bd9..e5d7301 100644 --- a/services/java/com/android/server/RandomBlock.java +++ b/services/java/com/android/server/RandomBlock.java @@ -62,11 +62,11 @@ class RandomBlock { return retval; } - void toFile(String filename) throws IOException { + void toFile(String filename, boolean sync) throws IOException { if (DEBUG) Slog.v(TAG, "writing to file " + filename); RandomAccessFile out = null; try { - out = new RandomAccessFile(filename, "rws"); + out = new RandomAccessFile(filename, sync ? "rws" : "rw"); toDataOut(out); truncateIfPossible(out); } finally { |
