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

Commit b1e30b39 authored by Henrik Backlund's avatar Henrik Backlund Committed by Steve Kondik
Browse files

Avoid using String.format in MediaRecorder

String.format was used instead of a simple string concatenation.
This is a problem when language is set to Arabic since simple
integers will be converted into Arabic numbers.

Change-Id: I2cbd4c5cd2d09117202e6ae191845fd5fc9154ec
parent 0ba7ae7a
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ public class MediaRecorder
            degrees != 270) {
            throw new IllegalArgumentException("Unsupported angle: " + degrees);
        }
        setParameter(String.format("video-param-rotation-angle-degrees=%d", degrees));
        setParameter("video-param-rotation-angle-degrees=" + degrees);
    }

    /**
@@ -437,7 +437,7 @@ public class MediaRecorder
        if (samplingRate <= 0) {
            throw new IllegalArgumentException("Audio sampling rate is not positive");
        }
        setParameter(String.format("audio-param-sampling-rate=%d", samplingRate));
        setParameter("audio-param-sampling-rate=" + samplingRate);
    }

    /**
@@ -452,7 +452,7 @@ public class MediaRecorder
        if (numChannels <= 0) {
            throw new IllegalArgumentException("Number of channels is not positive");
        }
        setParameter(String.format("audio-param-number-of-channels=%d", numChannels));
        setParameter("audio-param-number-of-channels=" + numChannels);
    }

    /**
@@ -468,7 +468,7 @@ public class MediaRecorder
        if (bitRate <= 0) {
            throw new IllegalArgumentException("Audio encoding bit rate is not positive");
        }
        setParameter(String.format("audio-param-encoding-bitrate=%d", bitRate));
        setParameter("audio-param-encoding-bitrate=" + bitRate);
    }

    /**
@@ -484,7 +484,7 @@ public class MediaRecorder
        if (bitRate <= 0) {
            throw new IllegalArgumentException("Video encoding bit rate is not positive");
        }
        setParameter(String.format("video-param-encoding-bitrate=%d", bitRate));
        setParameter("video-param-encoding-bitrate=" + bitRate);
    }

    /**