audioflinger: add watchdog on main mutex

Check every 10 seconds if main audioflinger mutex can be acquired and
trigger audioserver process restart if not.
This will allow to capture tombstones of locked up situations and avoid
the disruption of a system_server restart.

Bug: 30737845
Bug: 30388410
Change-Id: I8a78b8cf813982f70ea598a6d42affc0ecaa76c9
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 8b831f0..05dacac 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -3,7 +3,8 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := \
-    ServiceUtilities.cpp
+    ServiceUtilities.cpp \
+    LockWatch.cpp
 
 # FIXME Move this library to frameworks/native
 LOCAL_MODULE := libserviceutility