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
This commit is contained in:
Nikolas Havrikov
2023-01-09 15:01:56 +00:00
parent 123d9f6360
commit 7af36afe5f

View File

@@ -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);
}
};