Merge "Fixes a thread safety issue (a time-of-check-time-of-use bug) in BatteryExternalStatsWorker that causes system_server crashes in VROS device." am: 75a97e482f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2576760

Change-Id: Idbe26af9bb631ac78b098821e00778f9c2d21a13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-05-05 03:14:57 +00:00
committed by Automerger Merge Worker

View File

@@ -399,7 +399,7 @@ class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync {
} }
} }
public void shutdown() { public synchronized void shutdown() {
mExecutorService.shutdownNow(); mExecutorService.shutdownNow();
} }