Android O MR1 IOT Release 1.0.8 (5206609)
Handle /sys/power/* interfaces not being available.

If either /sys/power/wakeup_count or /sys/power/state fail to open, we
construct SystemSuspend with blocking fds. This way this process will
keep running, handle wake lock requests, collect stats, but won't
suspend the device.

We want this behavior on devices (hosts) where system suspend should not
be handles by Android platform e.g. ARC++, Android virtual devices.

Bug: 118637369
Test: Remove system.suspend access to /sys/power/{ wakeup_count state }
using SELinux. Device still boots and doesn't suspend.
Change-Id: I068a584ada6968520219ee5288f598a53aa48c68
1 file changed