summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/tools
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2012-10-17 16:15:51 -0700
committerDoris Liu <tianliu@google.com>2012-10-17 18:44:10 -0700
commit9726d8bed6fa6b0403466be4aceb860dffa57b80 (patch)
treeae74ec93a2502ccca52b991d9183cf8ddf097cf5 /src/com/android/gallery3d/filtershow/tools
parent82a5fe8fb0d44c497dcb419b6693ef3d28de3e8e (diff)
downloadandroid_packages_apps_Snap-9726d8bed6fa6b0403466be4aceb860dffa57b80.tar.gz
android_packages_apps_Snap-9726d8bed6fa6b0403466be4aceb860dffa57b80.tar.bz2
android_packages_apps_Snap-9726d8bed6fa6b0403466be4aceb860dffa57b80.zip
Save edited picasa to "Edited Online Photos" album
Bug: 7346157 This CL includes the following changes: 1) Save the new image to a new folder named "Edited Online Photos" 2) After the picture is saved, the user will be in the "Edited Online Photos" folder 3) Change the toast during saving to "Saving to" + new folder name Change-Id: Ic505925425419ba9e3c7dac31fd403bf73d6887d
Diffstat (limited to 'src/com/android/gallery3d/filtershow/tools')
-rw-r--r--src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java b/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
index 49cc33a2a..23f497258 100644
--- a/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
+++ b/src/com/android/gallery3d/filtershow/tools/SaveCopyTask.java
@@ -30,6 +30,7 @@ import android.provider.MediaStore.Images.ImageColumns;
import android.view.Gravity;
import android.widget.Toast;
+import com.android.camera.R;
import com.android.gallery3d.filtershow.presets.ImagePreset;
//import com.android.gallery3d.R;
@@ -49,9 +50,8 @@ import java.text.SimpleDateFormat;
*/
public class SaveCopyTask extends AsyncTask<ProcessedBitmap, Void, Uri> {
- public static final String DOWNLOAD = "download";
- public static final String DEFAULT_SAVE_DIRECTORY = "Download";
private static final int DEFAULT_COMPRESS_QUALITY = 95;
+ private static final String DEFAULT_SAVE_DIRECTORY = "EditedOnlinePhotos";
/**
* Saves the bitmap in the final destination
@@ -114,13 +114,17 @@ public class SaveCopyTask extends AsyncTask<ProcessedBitmap, Void, Uri> {
System.currentTimeMillis()));
}
- public static File getNewFile(Context context, Uri sourceUri) {
+ public static File getFinalSaveDirectory(Context context, Uri sourceUri) {
File saveDirectory = getSaveDirectory(context, sourceUri);
if ((saveDirectory == null) || !saveDirectory.canWrite()) {
saveDirectory = new File(Environment.getExternalStorageDirectory(),
- DOWNLOAD);
+ DEFAULT_SAVE_DIRECTORY);
}
+ return saveDirectory;
+ }
+ 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()));
return new File(saveDirectory, filename + ".JPG");