commit | 291c32a7b7c2d982c43c7b10f94dce291c8b0b3d | [log] [tgz] |
---|---|---|
author | Jeff Sharkey <jsharkey@android.com> | Wed Jul 05 12:34:04 2017 -0600 |
committer | Jeff Sharkey <jsharkey@android.com> | Wed Jul 05 16:58:51 2017 -0600 |
tree | fee30aa1056655c96724004e2a235e204a544331 | |
parent | f4d4f9b91357cc354f5a150ddb8ab00bf45c016e [diff] |
Allow timed wakelocks to be released gracefully. When using a reference-counted wakelock together with a timeout, we can end up with an over-released wakelock which causes an app crash. To mitigate this, only throw based on count of external acquire/release events. Bug: 62326550 Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.PowerManager_WakeLockTest Change-Id: I66480cb9798f9404ae3d45a70d68eae136d289de