summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropLoader.java2
-rw-r--r--src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java8
-rw-r--r--src/com/android/gallery3d/util/SaveVideoFileUtils.java5
3 files changed, 6 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropLoader.java b/src/com/android/gallery3d/filtershow/crop/CropLoader.java
index fc461f5d0..430647e20 100644
--- a/src/com/android/gallery3d/filtershow/crop/CropLoader.java
+++ b/src/com/android/gallery3d/filtershow/crop/CropLoader.java
@@ -38,8 +38,8 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.sql.Date;
import java.text.SimpleDateFormat;
+import java.util.Date;
/**
* This class contains static methods for loading a bitmap and
diff --git a/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java b/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
index c5851c476..641f00f7f 100644
--- a/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
+++ b/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
@@ -41,8 +41,8 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.sql.Date;
import java.text.SimpleDateFormat;
+import java.util.Date;
import java.util.TimeZone;
/**
@@ -84,8 +84,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) {
@@ -102,8 +101,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");
}
diff --git a/src/com/android/gallery3d/util/SaveVideoFileUtils.java b/src/com/android/gallery3d/util/SaveVideoFileUtils.java
index c281dd3e7..9e8f73a3d 100644
--- a/src/com/android/gallery3d/util/SaveVideoFileUtils.java
+++ b/src/com/android/gallery3d/util/SaveVideoFileUtils.java
@@ -25,8 +25,8 @@ import android.provider.MediaStore.Video;
import android.provider.MediaStore.Video.VideoColumns;
import java.io.File;
-import java.sql.Date;
import java.text.SimpleDateFormat;
+import java.util.Date;
public class SaveVideoFileUtils {
// Copy from SaveCopyTask.java in terms of how to handle the destination
@@ -50,8 +50,7 @@ public class SaveVideoFileUtils {
} else {
dstFileInfo.mFolderName = dstFileInfo.mDirectory.getName();
}
- dstFileInfo.mFileName = new SimpleDateFormat(fileNameFormat).format(
- new Date(System.currentTimeMillis()));
+ dstFileInfo.mFileName = new SimpleDateFormat(fileNameFormat).format(new Date());
dstFileInfo.mFile = new File(dstFileInfo.mDirectory, dstFileInfo.mFileName + ".mp4");
return dstFileInfo;