From 81639fe542fe3d82214970f1ec7656c298fca524 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Mon, 12 Sep 2016 16:27:23 +0200 Subject: [PATCH] Released incall wake lock at the call end --- src/org/linphone/LinphoneManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 76dd19ba5..b0721d1ed 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -1112,6 +1112,12 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag routeAudioToReceiver(); } } + if (mIncallWakeLock != null && mIncallWakeLock.isHeld()) { + mIncallWakeLock.release(); + Log.i("Last call ended: releasing incall (CPU only) wake lock"); + } else { + Log.i("Last call ended: no incall (CPU only) wake lock were held"); + } } } if (state == State.CallUpdatedByRemote) {