audioflinger: Fix battery accounting for offload tracks am: e94c27a17f am: 7cba7beec4
am: e50af19356
Change-Id: I80e26985a69800d31b0aa9331bccdc0a91caa08b
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 1907e12..99a5297 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3106,9 +3106,9 @@
if (!keepWakeLock()) {
releaseWakeLock_l();
released = true;
+ mWakeLockUids.clear();
+ mActiveTracksGeneration++;
}
- mWakeLockUids.clear();
- mActiveTracksGeneration++;
ALOGV("wait async completion");
mWaitWorkCV.wait(mLock);
ALOGV("async completion/wake");