AudioFlinger: more fixes for offload audio lost
mStandby being false was not a reliable indication that
something had been written to audio HAL.
Considering the last track in mActiveTracks vector as the
latest activated track was wrong as this is a SortedVector.
Bug: 11247103.
Change-Id: I397d011c5afcdd779def3fe25aaae7669a472cfc
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 81804c2..a0b53cb 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -501,6 +501,7 @@
SortedVector< wp<Track> > mActiveTracks; // FIXME check if this could be sp<>
SortedVector<int> mWakeLockUids;
int mActiveTracksGeneration;
+ wp<Track> mLatestActiveTrack; // latest track added to mActiveTracks
// Allocate a track name for a given channel mask.
// Returns name >= 0 if successful, -1 on failure.