Merge "Make setCaptureRate locale safe"

This commit is contained in:
Jean-Baptiste Queru
2012-08-27 10:22:29 -07:00
committed by android code review

View File

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