Android O MR1 IOT Release 1.0.5 (5014699)
Implement exponential backoff analogous to libsuspend

Suspends attempts are not free w.r.t. power consumption. This change prevents
rapid battery drain on devices with broken system suspend (e.g. due to faulty
driver)

Originally implemented in libususpend in commit
fb896944b6a78d951c8442b444af860a28117e5c

Bug: 78888165
Test: SystemSuspendV1_0UnitTest
Test: left device overnight, ~50% fewer failed attempts to suspend with this
change vs without.
Change-Id: Icff1135b9c316fa9de1558ecea42db9ed0d10d9a
4 files changed