Merge "TimeCheck: Track waiting through thread join in AudioFlinger" into main
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 0766a0d..2b17e92 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -691,6 +691,10 @@
     }
     // When Thread::requestExitAndWait is made virtual and this method is renamed to
     // "virtual status_t requestExitAndWait()", replace by "return Thread::requestExitAndWait();"
+
+    // For TimeCheck: track waiting on the thread join of getTid().
+    audio_utils::mutex::scoped_join_wait_check sjw(getTid());
+
     requestExitAndWait();
 }