mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-18 12:20:36 +01:00
cleanup the empty files after recording
This commit is contained in:
parent
5c80e98888
commit
d5d98fcf31
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user