Skip to content

Commit 9de9342

Browse files
bradfitzAndroid Code Review
authored andcommitted
Merge "Without SD card the shutdown sequence was delayed"
2 parents 5580e44 + 5d0db4d commit 9de9342

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

services/java/com/android/server/MountService.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,17 @@ public void shutdown(final IMountShutdownObserver observer) {
958958
// Post a unmount message.
959959
ShutdownCallBack ucb = new ShutdownCallBack(path, observer);
960960
mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_PM_UPDATE, ucb));
961+
} else if (observer != null) {
962+
/*
963+
* Observer is waiting for onShutDownComplete when we are done.
964+
* Since nothing will be done send notification directly so shutdown
965+
* sequence can continue.
966+
*/
967+
try {
968+
observer.onShutDownComplete(StorageResultCode.OperationSucceeded);
969+
} catch (RemoteException e) {
970+
Slog.w(TAG, "RemoteException when shutting down");
971+
}
961972
}
962973
}
963974

0 commit comments

Comments
 (0)