OSDN Git Service

vold: Use Wakelock::tryGet()
authorKalesh Singh <kaleshsingh@google.com>
Mon, 22 Feb 2021 20:10:45 +0000 (15:10 -0500)
committerKalesh Singh <kaleshsingh@google.com>
Mon, 22 Feb 2021 22:24:51 +0000 (17:24 -0500)
commit98062dcd89da6913039da954924ca430b6914c52
tree6279055adbd5e9fcb4be124b2a19568dedb3c800
parent810bcca4d05eb1283cbac0567c673d2dae76e893
vold: Use Wakelock::tryGet()

Acquiring a wakelock can fail if the suspend service is unavailable.
Explicitly check that wakelock was acquired before performing
operations that require the device to stay on.

Bug: b/179229598
Test: Boot test on Pixel 4 device
Change-Id: If30087223e44098801a31d1bfd239ac22e891abe
Benchmark.cpp
IdleMaint.cpp
MoveStorage.cpp
cryptfs.cpp