diff options
author | Nikolas Havrikov <havrikov@google.com> | 2023-01-09 15:01:56 +0000 |
---|---|---|
committer | Nikolas Havrikov <havrikov@google.com> | 2023-01-09 15:09:29 +0000 |
commit | 7af36afe5f8ad66ce5195bfa236ae3cab811f527 (patch) | |
tree | 8baa27ee267a35168a5350c13889fb06c5fd5671 /services/java | |
parent | 123d9f6360a1eb17760cb180a3541f6824a78d96 (diff) | |
download | base-7af36afe5f8ad66ce5195bfa236ae3cab811f527.tar.gz |
Remove moot synchronization on shutdown
Currently, the call to rebootOrShutdown is synchronized on the
Runnable.this instance, and thus there is no way for any other thread
to contend on the same lock.
Change-Id: Idaacda47031431435598dfd45840b1344c5938e6
Test: manually
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 5b9460a226bb..2c84ea31a41f 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -1020,9 +1020,7 @@ public final class SystemServer implements Dumpable { Runnable runnable = new Runnable() { @Override public void run() { - synchronized (this) { - ShutdownThread.rebootOrShutdown(null, reboot, reason); - } + ShutdownThread.rebootOrShutdown(null, reboot, reason); } }; |