Loading services/java/com/android/server/EntropyService.java +2 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public class EntropyService extends Binder { private void loadInitialEntropy() { try { RandomBlock.fromFile(entropyFile).toFile(randomDevice); RandomBlock.fromFile(entropyFile).toFile(randomDevice, false); } catch (IOException e) { Slog.w(TAG, "unable to load initial entropy (first boot?)", e); } Loading @@ -104,7 +104,7 @@ public class EntropyService extends Binder { private void writeEntropy() { try { RandomBlock.fromFile(randomDevice).toFile(entropyFile); RandomBlock.fromFile(randomDevice).toFile(entropyFile, true); } catch (IOException e) { Slog.w(TAG, "unable to write entropy", e); } Loading services/java/com/android/server/RandomBlock.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading
services/java/com/android/server/EntropyService.java +2 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public class EntropyService extends Binder { private void loadInitialEntropy() { try { RandomBlock.fromFile(entropyFile).toFile(randomDevice); RandomBlock.fromFile(entropyFile).toFile(randomDevice, false); } catch (IOException e) { Slog.w(TAG, "unable to load initial entropy (first boot?)", e); } Loading @@ -104,7 +104,7 @@ public class EntropyService extends Binder { private void writeEntropy() { try { RandomBlock.fromFile(randomDevice).toFile(entropyFile); RandomBlock.fromFile(randomDevice).toFile(entropyFile, true); } catch (IOException e) { Slog.w(TAG, "unable to write entropy", e); } Loading
services/java/com/android/server/RandomBlock.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading