Fix AudioFlinger TimeCheck

The conversion of IAudioFlinger to AIDL resulted in a regression in
its watchdog behavior. This change fixes that by allowing the
implementation to fully wrap the onTransact() call rather than just
prepend to it using onPreTransact().

Fixes: 187383878
Test: Added a long wait in createTrack, as described in the bug and
      watched to logs to confirm that the watchdog kills the process.
Change-Id: I3cceb2b37d27dbea2060ced3659e11bde363f86d
diff --git a/media/libaudioclient/IAudioFlinger.cpp b/media/libaudioclient/IAudioFlinger.cpp
index 7656307..389b73f 100644
--- a/media/libaudioclient/IAudioFlinger.cpp
+++ b/media/libaudioclient/IAudioFlinger.cpp
@@ -749,10 +749,20 @@
 AudioFlingerServerAdapter::AudioFlingerServerAdapter(
         const sp<AudioFlingerServerAdapter::Delegate>& delegate) : mDelegate(delegate) {}
 
-status_t AudioFlingerServerAdapter::onTransact(uint32_t code, const Parcel& data, Parcel* reply,
+status_t AudioFlingerServerAdapter::onTransact(uint32_t code,
+                                               const Parcel& data,
+                                               Parcel* reply,
                                                uint32_t flags) {
-    return mDelegate->onPreTransact(static_cast<Delegate::TransactionCode>(code), data, flags)
-           ?: BnAudioFlingerService::onTransact(code, data, reply, flags);
+    return mDelegate->onTransactWrapper(static_cast<Delegate::TransactionCode>(code),
+                                        data,
+                                        flags,
+                                        [&] {
+                                            return BnAudioFlingerService::onTransact(
+                                                    code,
+                                                    data,
+                                                    reply,
+                                                    flags);
+                                        });
 }
 
 status_t AudioFlingerServerAdapter::dump(int fd, const Vector<String16>& args) {