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

Commit 0b6f7b00 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "NuPlayer: use acquireWakeLockAsync in AWakeLock" into tm-dev

parents c3a974b3 b5af3eda
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -59,11 +59,10 @@ bool AWakeLock::acquire() {
        if (mPowerManager != NULL) {
            sp<IBinder> binder = new BBinder();
            int64_t token = IPCThreadState::self()->clearCallingIdentity();
            binder::Status status = mPowerManager->acquireWakeLock(
            binder::Status status = mPowerManager->acquireWakeLockAsync(
                    binder, POWERMANAGER_PARTIAL_WAKE_LOCK,
                    String16("AWakeLock"), String16("media"),
                    {} /* workSource */, {} /* historyTag */, -1 /* displayId */,
                    nullptr /* callback */);
                    {} /* workSource */, {} /* historyTag */);
            IPCThreadState::self()->restoreCallingIdentity(token);
            if (status.isOk()) {
                mWakeLockToken = binder;