Merge "Pass Binder token to ISuspendControlServiceInternal#enableAutosuspend"

This commit is contained in:
Treehugger Robot
2021-10-14 11:48:30 +00:00
committed by Gerrit Code Review

View File

@@ -178,9 +178,10 @@ sp<system::suspend::internal::ISuspendControlServiceInternal> getSuspendControlI
void enableAutoSuspend() {
static bool enabled = false;
if (!enabled) {
static sp<IBinder> autosuspendClientToken = new BBinder();
sp<system::suspend::internal::ISuspendControlServiceInternal> suspendControl =
getSuspendControlInternal();
suspendControl->enableAutosuspend(&enabled);
suspendControl->enableAutosuspend(autosuspendClientToken, &enabled);
}
{