Merge "recorder: Change the file read/write mode to be rw."

This commit is contained in:
Hangyu Kuang
2017-10-13 18:11:19 +00:00
committed by Android (Google) Code Review

View File

@@ -917,7 +917,7 @@ public class MediaRecorder
*/
public void setNextOutputFile(File file) throws IOException
{
RandomAccessFile f = new RandomAccessFile(file, "rws");
RandomAccessFile f = new RandomAccessFile(file, "rw");
try {
_setNextOutputFile(f.getFD());
} finally {
@@ -942,7 +942,7 @@ public class MediaRecorder
public void prepare() throws IllegalStateException, IOException
{
if (mPath != null) {
RandomAccessFile file = new RandomAccessFile(mPath, "rws");
RandomAccessFile file = new RandomAccessFile(mPath, "rw");
try {
_setOutputFile(file.getFD());
} finally {
@@ -951,7 +951,7 @@ public class MediaRecorder
} else if (mFd != null) {
_setOutputFile(mFd);
} else if (mFile != null) {
RandomAccessFile file = new RandomAccessFile(mFile, "rws");
RandomAccessFile file = new RandomAccessFile(mFile, "rw");
try {
_setOutputFile(file.getFD());
} finally {