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

Commit 4e693f55 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Verify that AudioRecord object is initialized for more APIs"

parents 7fc72307 8057f24d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -694,6 +694,9 @@ public class AudioRecord
     *  {@link #ERROR_INVALID_OPERATION}
     */
    public int setNotificationMarkerPosition(int markerInFrames) {
        if (mState == STATE_UNINITIALIZED) {
            return ERROR_INVALID_OPERATION;
        }
        return native_set_marker_pos(markerInFrames);
    }

@@ -706,6 +709,9 @@ public class AudioRecord
     * @return error code or success, see {@link #SUCCESS}, {@link #ERROR_INVALID_OPERATION}
     */
    public int setPositionNotificationPeriod(int periodInFrames) {
        if (mState == STATE_UNINITIALIZED) {
            return ERROR_INVALID_OPERATION;
        }
        return native_set_pos_update_period(periodInFrames);
    }