AudioFlinger: Extract PatchPanel class
Test: atest audiorecord_tests audiotrack_tests audiorouting_tests trackplayerbase_tests audiosystem_tests
Test: atest AAudioTests AudioTrackOffloadTest
Test: atest AudioTrackTest AudioRecordTest
Test: YouTube Camera
Bug: 288339104
Bug: 291284401
Change-Id: I165db16ae8214335017bac034a42e7ba9060a48d
diff --git a/services/audioflinger/PatchPanel.h b/services/audioflinger/PatchPanel.h
index b3c8a11..6ef4d1a 100644
--- a/services/audioflinger/PatchPanel.h
+++ b/services/audioflinger/PatchPanel.h
@@ -15,12 +15,10 @@
** limitations under the License.
*/
-#ifndef INCLUDING_FROM_AUDIOFLINGER_H
- #error This header file should only be included from AudioFlinger.h
-#endif
+#pragma once
-public: // TODO(b/288339104) extract out of AudioFlinger class
-// PatchPanel is concealed within AudioFlinger, their lifetimes are the same.
+namespace android {
+
class PatchPanel : public IAfPatchPanel {
public:
explicit PatchPanel(AudioFlinger* audioFlinger) : mAudioFlinger(*audioFlinger) {}
@@ -134,4 +132,4 @@
std::map<audio_module_handle_t, ModuleConnections> mInsertedModules;
};
-private:
+} // namespace android