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
This commit is contained in:
Johan Alfven
2010-11-09 10:32:25 +01:00
committed by Johan Redestig
parent 5580e44c25
commit 5d0db4d356

View File

@@ -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");
}
}
}