AudioSystem: new audioflinger restart detection

Add a specific method to AudioSystem for AudioService to poll
for AudioFlinger service restart instead of relying on current
callback mechanism which is flaky.

Bug: 9693068.
Change-Id: Ie88bc9d25033503bc5cd2fa9d8c754d0f8045b8f
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 006af08..225ef76 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -252,6 +252,9 @@
     // bit rate, duration, video and streaming or offload property is enabled
     static bool isOffloadSupported(const audio_offload_info_t& info);
 
+    // check presence of audio flinger service.
+    // returns NO_ERROR if binding to service succeeds, DEAD_OBJECT otherwise
+    static status_t checkAudioFlinger();
     // ----------------------------------------------------------------------------
 
 private: