Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acedbfbd authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Pass Binder token to ISuspendControlServiceInternal#enableAutosuspend"...

Merge "Pass Binder token to ISuspendControlServiceInternal#enableAutosuspend" am: 530fbd2d am: 91b63223

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

Change-Id: Iefe3dc119bcf8fa72b453d4cf0d302b844757377
parents 865df789 91b63223
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -178,9 +178,10 @@ sp<system::suspend::internal::ISuspendControlServiceInternal> getSuspendControlI
void enableAutoSuspend() {
void enableAutoSuspend() {
    static bool enabled = false;
    static bool enabled = false;
    if (!enabled) {
    if (!enabled) {
        static sp<IBinder> autosuspendClientToken = new BBinder();
        sp<system::suspend::internal::ISuspendControlServiceInternal> suspendControl =
        sp<system::suspend::internal::ISuspendControlServiceInternal> suspendControl =
                getSuspendControlInternal();
                getSuspendControlInternal();
        suspendControl->enableAutosuspend(&enabled);
        suspendControl->enableAutosuspend(autosuspendClientToken, &enabled);
    }
    }


    {
    {