Merge "Send ACTION_SHUTDOWN broadcast to manifest receivers" into oc-dev

am: 630a49aa4e

Change-Id: Ib2a4229a6b00810b9dd73733421f3ac7e57f2112
This commit is contained in:
Christopher Tate
2017-06-13 21:47:03 +00:00
committed by android-build-merger
2 changed files with 3 additions and 1 deletions

View File

@@ -600,6 +600,7 @@ final class UserController {
void finishUserStopping(final int userId, final UserState uss) { void finishUserStopping(final int userId, final UserState uss) {
// On to the next. // On to the next.
final Intent shutdownIntent = new Intent(Intent.ACTION_SHUTDOWN); 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. // This is the result receiver for the final shutdown broadcast.
final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() { final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() {
@Override @Override

View File

@@ -391,7 +391,8 @@ public final class ShutdownThread extends Thread {
// First send the high-level shut down broadcast. // First send the high-level shut down broadcast.
mActionDone = false; mActionDone = false;
Intent intent = new Intent(Intent.ACTION_SHUTDOWN); Intent intent = new Intent(Intent.ACTION_SHUTDOWN);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND
| Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
mContext.sendOrderedBroadcastAsUser(intent, mContext.sendOrderedBroadcastAsUser(intent,
UserHandle.ALL, null, br, mHandler, 0, null, null); UserHandle.ALL, null, br, mHandler, 0, null, null);