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

Commit 06aea9df authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Do not send SHUTDOWN broadcast to manifest receivers

Test: adb shell svc power reboot
Test: SendShutdownBroadcast should take << 10 seconds (no timeout)
Bug: 66783517
Change-Id: I01d3dab6c24add323ee0ec990c3f7a7864ce4ad7
parent 9eb15556
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -631,7 +631,6 @@ class UserController implements Handler.Callback {
    void finishUserStopping(final int userId, final UserState uss) {
        // On to the next.
        final Intent shutdownIntent = new Intent(Intent.ACTION_SHUTDOWN);
        shutdownIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
        // This is the result receiver for the final shutdown broadcast.
        final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() {
            @Override
+1 −2
Original line number Diff line number Diff line
@@ -457,8 +457,7 @@ public final class ShutdownThread extends Thread {
        // First send the high-level shut down broadcast.
        mActionDone = false;
        Intent intent = new Intent(Intent.ACTION_SHUTDOWN);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND
                | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mContext.sendOrderedBroadcastAsUser(intent,
                UserHandle.ALL, null, br, mHandler, 0, null, null);