import java.io.File;
import java.io.IOException;
-import java.sql.Date;
import java.text.SimpleDateFormat;
+import java.util.Date;
public class TrimVideo extends Activity implements
MediaPlayer.OnErrorListener,
} else {
saveFolderName = mSaveDirectory.getName();
}
- mSaveFileName = new SimpleDateFormat(TIME_STAMP_NAME).format(
- new Date(System.currentTimeMillis()));
+ mSaveFileName = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date());
mDstFile = new File(mSaveDirectory, mSaveFileName + ".mp4");
mSrcFile = new File(mSrcVideoPath);
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.sql.Date;
import java.text.SimpleDateFormat;
+import java.util.Date;
/**
* Asynchronous task for saving edited photo as a new copy.
this.destinationFile = destination;
}
- saveFileName = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date(
- System.currentTimeMillis()));
+ saveFileName = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date());
}
public static File getFinalSaveDirectory(Context context, Uri sourceUri) {
public static File getNewFile(Context context, Uri sourceUri) {
File saveDirectory = getFinalSaveDirectory(context, sourceUri);
- String filename = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date(
- System.currentTimeMillis()));
+ String filename = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date());
return new File(saveDirectory, filename + ".JPG");
}