Merge "Don't release WakeLock w/o active client" into rvc-qpr-dev am: 2dd4e12e54

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13375990

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I55c7a9846b5faed85c32f2d7b5c7d41b4f2ed058
This commit is contained in:
TreeHugger Robot
2021-01-20 20:24:32 +00:00
committed by Automerger Merge Worker

View File

@@ -33,7 +33,7 @@ public interface WakeLock {
static final String REASON_WRAP = "wrap";
/**
* Default wake-lock timeout, to avoid battery regressions.
* Default wake-lock timeout in milliseconds, to avoid battery regressions.
*/
long DEFAULT_MAX_TIMEOUT = 20000;
@@ -104,6 +104,7 @@ public interface WakeLock {
if (count == null) {
Log.wtf(TAG, "Releasing WakeLock with invalid reason: " + why,
new Throwable());
return;
} else if (count == 1) {
mActiveClients.remove(why);
} else {