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

Commit b67cf9e0 authored by Robert Wu's avatar Robert Wu
Browse files

Address comments with getDeviceIds

Addressing the following comments from NDK API council.
1. Available since API level 36 should not be the first line.
2. Comments about stream being Nonnull are not needed.
3. Both ids and numIds should be marked with Nullable.

Bug: 380300288
Test: atest AAudioTests
Flag: EXEMPT NDK
Change-Id: I0e2c00d46ceeb1039a016b4684013778f2fcef32
parent 7d652bd3
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1909,18 +1909,17 @@ AAUDIO_API int32_t AAudioStream_getSamplesPerFrame(AAudioStream* _Nonnull stream
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual device id. If there are multiple device ids used, the first device picked by
 *         the audio policy engine will be returned.
 * @return actual device id. If there are multiple device ids used,
 *         this will return the first device id from AAudioStream_getDeviceIds().
 */
AAUDIO_API int32_t AAudioStream_getDeviceId(AAudioStream* _Nonnull stream) __INTRODUCED_IN(26);

/**
 * Available since API level 36.
 *
 * Call this function after AAudioStreamBuilder_openStream().
 * This function will crash if stream is null.
 * An array of size 16 should generally be large enough to fit all device identifiers.
 *
 * Available since API level 36.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream().
 * @param ids reference to an array of ids.
 * @params numIds size allocated to the array of ids.
@@ -1933,7 +1932,7 @@ AAUDIO_API int32_t AAudioStream_getDeviceId(AAudioStream* _Nonnull stream) __INT
 *         Otherwise, if ids is null, return {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT}.
 */
AAUDIO_API aaudio_result_t AAudioStream_getDeviceIds(AAudioStream* _Nonnull stream,
        int32_t* _Nonnull ids, int32_t* _Nonnull numIds) __INTRODUCED_IN(36);
        int32_t* _Nullable ids, int32_t* _Nullable numIds) __INTRODUCED_IN(36);

/**
 * Available since API level 26.