AAudioService: add dumpsys capability

Test: adb shell dumpsys media.aaudio
Bug: 38396780
Change-Id: I8b5c421bdd1b3228d8140816a68740709aa9757b
diff --git a/services/oboeservice/AAudioEndpointManager.h b/services/oboeservice/AAudioEndpointManager.h
index 899ea35..6dc5adf 100644
--- a/services/oboeservice/AAudioEndpointManager.h
+++ b/services/oboeservice/AAudioEndpointManager.h
@@ -34,6 +34,18 @@
     ~AAudioEndpointManager() = default;
 
     /**
+     * Returns EndpointManager information.
+     *
+     * Will attempt to get the object lock, but will proceed
+     * even if it cannot.
+     *
+     * Each line of information ends with a newline.
+     *
+     * @return a string representing the EndpointManager info
+     */
+    std::string dump() const;
+
+    /**
      * Find a service endpoint for the given deviceId and direction.
      * If an endpoint does not already exist then try to create one.
      *
@@ -49,7 +61,7 @@
 
 private:
 
-    std::mutex    mLock;
+    mutable std::mutex mLock;
 
     std::map<int32_t, AAudioServiceEndpointCapture *> mInputs;
     std::map<int32_t, AAudioServiceEndpointPlay *> mOutputs;