summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Storage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/Storage.java')
-rw-r--r--src/com/android/camera/Storage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/camera/Storage.java b/src/com/android/camera/Storage.java
index 38a6d48..ea281a9 100644
--- a/src/com/android/camera/Storage.java
+++ b/src/com/android/camera/Storage.java
@@ -52,7 +52,7 @@ public class Storage {
public static Uri addImage(ContentResolver resolver, String title, long date,
Location location, int orientation, byte[] jpeg, int width, int height) {
// Save the image.
- String path = DIRECTORY + '/' + title + ".jpg";
+ String path = generateFilepath(title);
FileOutputStream out = null;
try {
out = new FileOutputStream(path);
@@ -98,6 +98,10 @@ public class Storage {
return uri;
}
+ public static String generateFilepath(String title) {
+ return DIRECTORY + '/' + title + ".jpg";
+ }
+
public static long getAvailableSpace() {
String state = Environment.getExternalStorageState();
Log.d(TAG, "External storage state=" + state);