Commit 816b3361 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Someone's IDE chose the wrong Date.

Part 2 of the mystery of the java.sql.Date in preloaded-classes solved.

Change-Id: If819d89d1cb7ac015adee7a39a6fda963c6a1022
parent 5e86fd15
......@@ -44,8 +44,8 @@ import com.android.gallery3d.util.BucketNames;
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,
......@@ -282,8 +282,7 @@ public class TrimVideo extends Activity implements
} 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);
......
......@@ -42,8 +42,8 @@ import java.io.FileOutputStream;
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.
......@@ -115,8 +115,7 @@ public class SaveCopyTask extends AsyncTask<ImagePreset, Void, Uri> {
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) {
......@@ -132,8 +131,7 @@ public class SaveCopyTask extends AsyncTask<ImagePreset, Void, Uri> {
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");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment