mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
cleanup the empty files after recording
This commit is contained in:
@ -67,6 +67,7 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
|
||||
isFlashEnabled = false;
|
||||
isVideoMode = false;
|
||||
isSurfaceCreated = false;
|
||||
curVideoPath = "";
|
||||
}
|
||||
|
||||
public void setCamera(int cameraId) {
|
||||
@ -507,6 +508,10 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
|
||||
}
|
||||
}
|
||||
|
||||
final File file = new File(curVideoPath);
|
||||
if (file.exists() && file.length() == 0) {
|
||||
file.delete();
|
||||
}
|
||||
isRecording = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user