Besides my above comment, you can easily find out these types of things as android is open source.
So first take a look at the android AudioRecord source code. In there you will notice the AudioRecord constructor calls a method called native_start as well as other native methods to setup the audio via JNI.

browsing further you will see a comment referencing the AudioRecord.cpp file.
The cpp file can be found here you might need to make sure you take a look at the one that matches your android version, I just picked anyone from a Google search. In there you will of course see how the AudioRecord class functions natively, as well as what methods it exposes to JNI etc

With the above you can essentially see the AudioRecord java class essentially interacts with the native code, which is what you want to achieve
UPDATE:
So from your comment you can do exactly this. The issue is I just took random links so sorry maybe my fault.
If you look at the master branch source code you will find what you are looking for.
In the AudioRecord.java in the master branch you will find it accepts a AudioAttributes class in the constructor, which undergoes some filtering further down and then finally native_setup is called with these filtered audio attributesmAudioAttributes:

You could further see how ithese attributes are being applied in the native code AudioRecord.cpp by following the trail of the jaa variable passed into the native_setup via AudioRecord.java which maps to the native method android_media_AudioRecord_setup :

