diff options
| author | San Mehat <san@google.com> | 2010-02-09 08:58:23 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-02-09 08:58:23 -0800 |
| commit | c8da710f001f149557121b535da0b71d6da87484 (patch) | |
| tree | 55e7624b55fbaf782fd8afbe1fdd7c41ad5c9318 | |
| parent | ace5a3fbfbf1b41905410925f1ea007040a7a675 (diff) | |
| parent | 1bf3f8be7c01aa77afc114e0728cb041e95640b1 (diff) | |
| download | frameworks_base-c8da710f001f149557121b535da0b71d6da87484.zip frameworks_base-c8da710f001f149557121b535da0b71d6da87484.tar.gz frameworks_base-c8da710f001f149557121b535da0b71d6da87484.tar.bz2 | |
Merge changes I1aabef01,I8dbd0f83
* changes:
SystemServer: Move MountService startup before NotificationManagerService
StorageManager: Check for a null MountService
| -rw-r--r-- | core/java/android/storage/StorageManager.java | 4 | ||||
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/core/java/android/storage/StorageManager.java b/core/java/android/storage/StorageManager.java index dd8bd63..924d169 100644 --- a/core/java/android/storage/StorageManager.java +++ b/core/java/android/storage/StorageManager.java @@ -254,6 +254,10 @@ public class StorageManager */ public StorageManager(Looper tgtLooper) throws RemoteException { mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount")); + if (mMountService == null) { + Log.e(TAG, "Unable to connect to mount service! - is it running yet?"); + return; + } mTgtLooper = tgtLooper; mBinderListener = new MountServiceBinderListener(); mMountService.registerListener(mBinderListener); 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,19 +273,22 @@ class ServerThread extends Thread { } try { - Log.i(TAG, "Notification Manager"); - notification = new NotificationManagerService(context, statusBar, lights); - ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification); + /* + * 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 Notification Manager", e); + Log.e(TAG, "Failure starting Mount Service", e); } try { - // MountService must start after NotificationManagerService - Log.i(TAG, "Mount Service"); - ServiceManager.addService("mount", new MountService(context)); + Log.i(TAG, "Notification Manager"); + notification = new NotificationManagerService(context, statusBar, lights); + ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification); } catch (Throwable e) { - Log.e(TAG, "Failure starting Mount Service", e); + Log.e(TAG, "Failure starting Notification Manager", e); } try { |
