From eb4f528872776a257ca6f007c1a7deb7744c850e Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Mon, 13 May 2019 14:26:19 -0700 Subject: [PATCH] Must synchronize for ...Locked() code paths Fixes: 130124446 Test: manual (reboot instrumentation) Change-Id: I8651fe876f23bc0ea7e3aab57f5a61727985815e --- .../java/com/android/server/am/PreBootBroadcaster.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/am/PreBootBroadcaster.java b/services/core/java/com/android/server/am/PreBootBroadcaster.java index 376999dfd80d5..beb0e4741c360 100644 --- a/services/core/java/com/android/server/am/PreBootBroadcaster.java +++ b/services/core/java/com/android/server/am/PreBootBroadcaster.java @@ -107,9 +107,11 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub { EventLogTags.writeAmPreBoot(mUserId, componentName.getPackageName()); mIntent.setComponent(componentName); - mService.broadcastIntentLocked(null, null, mIntent, null, this, 0, null, null, null, - AppOpsManager.OP_NONE, null, true, false, ActivityManagerService.MY_PID, - Process.SYSTEM_UID, Binder.getCallingUid(), Binder.getCallingPid(), mUserId); + synchronized (mService) { + mService.broadcastIntentLocked(null, null, mIntent, null, this, 0, null, null, null, + AppOpsManager.OP_NONE, null, true, false, ActivityManagerService.MY_PID, + Process.SYSTEM_UID, Binder.getCallingUid(), Binder.getCallingPid(), mUserId); + } } @Override