Merge "Pass Binder token to ISuspendControlServiceInternal#enableAutosuspend"

This commit is contained in:
TreeHugger Robot
2021-09-30 12:34:33 +00:00
committed by Android (Google) 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);
}
{