AudioFlinger: Add memory leak checking for HAL

$ adb shell setprop libc.debug.malloc.program android.hardware.audio.service
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell setenforce 0
$ adb shell pkill audioserver
$ adb shell dumpsys media.audio_flinger

Test: Check the audio flinger dumpsys as above.
Bug: 186054996
Bug: 187462632
Change-Id: I610e4b72af9dc1704864adc148e6d6bd23319a8b
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index ca4f663..f86df1e 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -457,11 +457,13 @@
 }
 #endif
 
-status_t DeviceHalHidl::dump(int fd) {
+status_t DeviceHalHidl::dump(int fd, const Vector<String16>& args) {
     if (mDevice == 0) return NO_INIT;
     native_handle_t* hidlHandle = native_handle_create(1, 0);
     hidlHandle->data[0] = fd;
-    Return<void> ret = mDevice->debug(hidlHandle, {} /* options */);
+    hidl_vec<hidl_string> hidlArgs;
+    argsFromHal(args, &hidlArgs);
+    Return<void> ret = mDevice->debug(hidlHandle, hidlArgs);
     native_handle_delete(hidlHandle);
     return processReturn("dump", ret);
 }