Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0db4d3 authored by Johan Alfven's avatar Johan Alfven Committed by Johan Redestig
Browse files

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
parent 5580e44c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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");
            }
        }
    }