SystemServer: Move MountService startup before NotificationManagerService
Signed-off-by: San Mehat <san@google.com>
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index ee1cc8d..6e9c21b 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -273,6 +273,17 @@
}
try {
+ /*
+ * NotificationManagerService is dependant on MountService,
+ * (for media / usb notifications) so we must start MountService first.
+ */
+ Log.i(TAG, "Mount Service");
+ ServiceManager.addService("mount", new MountService(context));
+ } catch (Throwable e) {
+ Log.e(TAG, "Failure starting Mount Service", e);
+ }
+
+ try {
Log.i(TAG, "Notification Manager");
notification = new NotificationManagerService(context, statusBar, lights);
ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification);
@@ -281,14 +292,6 @@
}
try {
- // MountService must start after NotificationManagerService
- Log.i(TAG, "Mount Service");
- ServiceManager.addService("mount", new MountService(context));
- } catch (Throwable e) {
- Log.e(TAG, "Failure starting Mount Service", e);
- }
-
- try {
Log.i(TAG, "Device Storage Monitor");
ServiceManager.addService(DeviceStorageMonitorService.SERVICE,
new DeviceStorageMonitorService(context));