audioflinger: Fix battery accounting for offload tracks
am: e94c27a17f
Change-Id: Id9d9258a8719c5358a5fd33cb346411528f70627
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index aa2561e..5e0a7ac 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");