EntropyMixer: Write entropy at shutdown / reboot / power
Write out entropy if we're shutting down or rebooting,
or if someone plugs in the power.
Bug: 8312061
Change-Id: Id9a48064a7bdfe6c05a9227ea95a1bdbd0e9b8ae
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 8ef247e..4631395 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -206,9 +206,6 @@
installer = new Installer();
installer.ping();
- Slog.i(TAG, "Entropy Mixer");
- ServiceManager.addService("entropy", new EntropyMixer());
-
Slog.i(TAG, "Power Manager");
power = new PowerManagerService();
ServiceManager.addService(Context.POWER_SERVICE, power);
@@ -257,6 +254,9 @@
ActivityManagerService.setSystemProcess();
+ Slog.i(TAG, "Entropy Mixer");
+ ServiceManager.addService("entropy", new EntropyMixer(context));
+
Slog.i(TAG, "User Service");
ServiceManager.addService(Context.USER_SERVICE,
UserManagerService.getInstance());