diff options
author | Johan Redestig <johan.redestig@sonymobile.com> | 2012-08-27 10:31:25 +0200 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-08-27 14:24:10 +0200 |
commit | 1c7928e8c68654d087f83c7cefc59095950b8bef (patch) | |
tree | 86ff82ffa6da11688b09e4e16c945244a44f75e0 /media/java | |
parent | 13ab2c9fdaec119a40b628ae772fd1462fbb826d (diff) | |
download | frameworks_base-1c7928e8c68654d087f83c7cefc59095950b8bef.zip frameworks_base-1c7928e8c68654d087f83c7cefc59095950b8bef.tar.gz frameworks_base-1c7928e8c68654d087f83c7cefc59095950b8bef.tar.bz2 |
Make setCaptureRate locale safe
Dont use the default String.format in setCaptureRate as it is both
locale unsafe and less efficient than regular string concatenation
in this case.
Change-Id: I29418ec0352ef8c79967592b6eb8ff66cc9c99f0
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/MediaRecorder.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 9af201d..613354f 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -351,12 +351,11 @@ public class MediaRecorder */ public void setCaptureRate(double fps) { // Make sure that time lapse is enabled when this method is called. - setParameter(String.format("time-lapse-enable=1")); + setParameter("time-lapse-enable=1"); double timeBetweenFrameCapture = 1 / fps; int timeBetweenFrameCaptureMs = (int) (1000 * timeBetweenFrameCapture); - setParameter(String.format("time-between-time-lapse-frame-capture=%d", - timeBetweenFrameCaptureMs)); + setParameter("time-between-time-lapse-frame-capture=" + timeBetweenFrameCaptureMs); } /** |