MountService: Remove ACTION_SHUTDOWN handler
Shutdown handlers run too early for unmounting, so don't handle it. Shutdown will be called explicitly from the ShutdownThread Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
@ -115,8 +115,6 @@ class MountService extends IMountService.Stub {
|
||||
// start processing events before we ought-to
|
||||
mContext.registerReceiver(mBroadcastReceiver,
|
||||
new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null);
|
||||
mContext.registerReceiver(mBroadcastReceiver,
|
||||
new IntentFilter(Intent.ACTION_SHUTDOWN), null, null);
|
||||
|
||||
mListener = new MountListener(this);
|
||||
mShowSafeUnmountNotificationWhenUnmounted = false;
|
||||
@ -133,8 +131,6 @@ class MountService extends IMountService.Stub {
|
||||
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
|
||||
Thread thread = new Thread(mListener, MountListener.class.getName());
|
||||
thread.start();
|
||||
} else if (action.equals(Intent.ACTION_SHUTDOWN)) {
|
||||
shutdown();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user