init: Take wakelock on zygote restart

If the framework is restarting (and cannot yet aquire
wakelocks to block suspend). Take a kernel wakelock
to allow the system to make sufficient progress before
autosuspend can be triggered.

The wakelock is later disable when the framework has
and invokeds enableAutosuspend() on the suspend service.

Bug: 255898234
Bug: 265513788
Bug: 266077359
Test: adb shell "echo mem > /sys/power/state && killall system_server"
Change-Id: Id8cff6564ef05d8c22a8264c51dd313263cb6a9d
Merged-In: Id8cff6564ef05d8c22a8264c51dd313263cb6a9d
2 files changed