Rename EntropyService to EntropyMixer
EntropyService implies that this program provides entropy to other
programs, and is misleading. The EntropyMixer class is designed purely
to stir the existing entropy pool with some possibily random-ish data,
and carryover entropy across device reboots.
Change-Id: I086cd339a3b652d32371521e61e1b1f555ce2280
diff --git a/services/java/com/android/server/EntropyService.java b/services/java/com/android/server/EntropyMixer.java
similarity index 96%
rename from services/java/com/android/server/EntropyService.java
rename to services/java/com/android/server/EntropyMixer.java
index 788a2f5..b63a70e 100644
--- a/services/java/com/android/server/EntropyService.java
+++ b/services/java/com/android/server/EntropyMixer.java
@@ -47,8 +47,8 @@
* <p>TODO: Investigate attempting to write entropy data at shutdown time
* instead of periodically.
*/
-public class EntropyService extends Binder {
- private static final String TAG = "EntropyService";
+public class EntropyMixer extends Binder {
+ private static final String TAG = "EntropyMixer";
private static final int ENTROPY_WHAT = 1;
private static final int ENTROPY_WRITE_PERIOD = 3 * 60 * 60 * 1000; // 3 hrs
private static final long START_TIME = System.currentTimeMillis();
@@ -72,12 +72,12 @@
}
};
- public EntropyService() {
+ public EntropyMixer() {
this(getSystemDir() + "/entropy.dat", "/dev/urandom");
}
/** Test only interface, not for public use */
- public EntropyService(String entropyFile, String randomDevice) {
+ public EntropyMixer(String entropyFile, String randomDevice) {
if (randomDevice == null) { throw new NullPointerException("randomDevice"); }
if (entropyFile == null) { throw new NullPointerException("entropyFile"); }
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 3ae62ad..762acbb 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -133,8 +133,8 @@
// Critical services...
try {
- Slog.i(TAG, "Entropy Service");
- ServiceManager.addService("entropy", new EntropyService());
+ Slog.i(TAG, "Entropy Mixer");
+ ServiceManager.addService("entropy", new EntropyMixer());
Slog.i(TAG, "Power Manager");
power = new PowerManagerService();