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

Commit bef01e4b authored by Dongwon Kang's avatar Dongwon Kang
Browse files

Fix mistyped exceptions; InvalidArgumentException

Test: manually tested MediaCodec throws IllegalArgumentException
Bug: 62700434
Change-Id: Id3bc37200c5d1b83ba978e6971ad3310083c8319
parent e67952ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ public final class PlaybackParams implements Parcelable {
     * Sets the pitch factor.
     * @param pitch
     * @return this <code>PlaybackParams</code> instance.
     * @throws InvalidArgumentException if the pitch is negative
     * @throws IllegalArgumentException if the pitch is negative.
     */
    public PlaybackParams setPitch(float pitch) {
        if (pitch < 0.f) {
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ public final class SyncParams {
     *     the maximum deviation of the playback rate from the playback rate
     *     set. ({@code abs(actual_rate - set_rate) / set_rate})
     * @return this <code>SyncParams</code> instance.
     * @throws InvalidArgumentException if the tolerance is negative, or not less than one
     * @throws IllegalArgumentException if the tolerance is negative, or not less than one.
     */
    public SyncParams setTolerance(float tolerance) {
        if (tolerance < 0.f || tolerance >= 1.f) {
+1 −1
Original line number Diff line number Diff line
@@ -1726,7 +1726,7 @@ static void android_media_MediaCodec_setVideoScalingMode(

    if (mode != NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW
            && mode != NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) {
        jniThrowException(env, "java/lang/InvalidArgumentException", NULL);
        jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
        return;
    }