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

Commit 42e0781f authored by Yorke Lee's avatar Yorke Lee
Browse files

Make InCall wakelock non-reference counted

Certain orders of call state changes can lead to a non-symmetric
number of acquire and release calls. Make the wakelock non-reference
counted to ensure that wakelock is held deterministically based on
whether or not there is a ringing call present.

Bug: 24073449
Change-Id: Ie6807fa983016e3c70e2e047e2756000835ad5ec
parent 772d378b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public class InCallWakeLockController extends CallsManagerListenerBase {

        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
        mFullWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG);
        mFullWakeLock.setReferenceCounted(false);

        callsManager.addListener(this);
    }