Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 988fc21a authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "AudioRecord: ensure documented behavior of active rec config"

parents 072a5a1f 1412a1d2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
    //--------------------
    /**
     * Accessed by native methods: provides access to C++ AudioRecord object
     * Is 0 after release()
     */
    @SuppressWarnings("unused")
    @UnsupportedAppUsage
@@ -1872,7 +1873,11 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
        if (mNativeRecorderInJavaObj == 0) {
            return 0;
        }
        try {
            return native_getPortId();
        } catch (IllegalStateException e) {
            return 0;
        }
    }

    //--------------------------------------------------------------------------
@@ -2055,6 +2060,9 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
    private native final int native_get_active_microphones(
            ArrayList<MicrophoneInfo> activeMicrophones);

    /**
     * @throws IllegalStateException
     */
    private native int native_getPortId();

    private native int native_set_preferred_microphone_direction(int direction);