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

Commit 2450830c authored by Henrik Backlund's avatar Henrik Backlund Committed by Johan Redestig
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 bcf2adeb
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -306,7 +306,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);
    }

    /**
@@ -425,7 +425,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);
    }

    /**
@@ -440,7 +440,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);
    }

    /**
@@ -456,7 +456,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);
    }

    /**
@@ -472,7 +472,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);
    }

    /**