diff options
author | Johan Alfven <johan.alfven@sonyericsson.com> | 2010-11-09 10:32:25 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonyericsson.com> | 2010-11-09 10:32:25 +0100 |
commit | 5d0db4d356346bee68aec9a124df70dbaa9aaed1 (patch) | |
tree | a061575e55a7bb6bf2cc093a62a5252a22da37c0 | |
parent | 5580e44c250944f5cd011b2682eea5cc2de9706c (diff) | |
download | frameworks_base-5d0db4d356346bee68aec9a124df70dbaa9aaed1.zip frameworks_base-5d0db4d356346bee68aec9a124df70dbaa9aaed1.tar.gz frameworks_base-5d0db4d356346bee68aec9a124df70dbaa9aaed1.tar.bz2 |
Without SD card the shutdown sequence was delayed
If the memory card is not inserted (or removed) from
the phone the shut down process is very long. It
takes almost 24 seconds. For the phone with memory
card the averige is 5-6 seconds
Make sure to send onShutDownComplete even if an SD
card is not mounted and no unmount is done.
Change-Id: I0e79b82e294a971f5e7144cdd3cc16b7ff414b9c
-rw-r--r-- | services/java/com/android/server/MountService.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index cb55808..542c740 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -958,6 +958,17 @@ class MountService extends IMountService.Stub // Post a unmount message. ShutdownCallBack ucb = new ShutdownCallBack(path, observer); mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_PM_UPDATE, ucb)); + } else if (observer != null) { + /* + * Observer is waiting for onShutDownComplete when we are done. + * Since nothing will be done send notification directly so shutdown + * sequence can continue. + */ + try { + observer.onShutDownComplete(StorageResultCode.OperationSucceeded); + } catch (RemoteException e) { + Slog.w(TAG, "RemoteException when shutting down"); + } } } |