Add support for getting all available microphones characteristics.
Add MicrophoneInfo to represent the microphone characteristics which
including location, orientation, frequency response, sensitivity,
channel mapping and other useful information.
Add a new API in AudioManager to query all current available
microphones.
Bug: 64038649
Test: Run test and check the print log.
Change-Id: Ie0dbfeeb84b88db426518b93c7bb83c8913bca85
diff --git a/core/jni/android_media_MicrophoneInfo.h b/core/jni/android_media_MicrophoneInfo.h
new file mode 100644
index 0000000..241b6d0
--- /dev/null
+++ b/core/jni/android_media_MicrophoneInfo.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_MEDIA_MICROPHONEINFO_H
+#define ANDROID_MEDIA_MICROPHONEINFO_H
+
+#include <system/audio.h>
+#include <media/MicrophoneInfo.h>
+
+#include "jni.h"
+
+namespace android {
+
+// Conversion from C++ MicrophoneInfo object to Java MicrophoneInfo object
+
+extern jint convertMicrophoneInfoFromNative(JNIEnv *env, jobject *jMicrophoneInfo,
+ const media::MicrophoneInfo *microphoneInfo);
+} // namespace android
+
+#endif
\ No newline at end of file