summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Redestig <johan.redestig@sonymobile.com>2012-10-03 13:43:47 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2012-11-19 09:29:05 +0100
commitda36e534e2edd3df0eb810ba2237b0c5bd403a63 (patch)
tree7125a25ad6935f58dc4b4c47f7619ca9162fe297
parente9eceb552f80f8fb1e33b530ef18f1d0ae406408 (diff)
downloadVideoEditor-da36e534e2edd3df0eb810ba2237b0c5bd403a63.tar.gz
Make locale safe paths
getVideoOutputMediaFileTitle was using SimpleDateFormat with the default locale to create paths. In some locales this resulted in characters that are not safe to use on all file systems. Explicitly use Locale.US to be locale safe. Change-Id: I3727a239396da82146a171d254a9bf5a5f8dcfef
-rwxr-xr-xsrc/com/android/videoeditor/VideoEditorActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/videoeditor/VideoEditorActivity.java b/src/com/android/videoeditor/VideoEditorActivity.java
index 193bae3..ca0b770 100755
--- a/src/com/android/videoeditor/VideoEditorActivity.java
+++ b/src/com/android/videoeditor/VideoEditorActivity.java
@@ -18,6 +18,7 @@ package com.android.videoeditor;
import java.util.ArrayList;
import java.util.Date;
+import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -665,7 +666,7 @@ public class VideoEditorActivity extends VideoEditorBaseActivity
private String getVideoOutputMediaFileTitle() {
long dateTaken = System.currentTimeMillis();
Date date = new Date(dateTaken);
- SimpleDateFormat dateFormat = new SimpleDateFormat("'VID'_yyyyMMdd_HHmmss");
+ SimpleDateFormat dateFormat = new SimpleDateFormat("'VID'_yyyyMMdd_HHmmss", Locale.US);
return dateFormat.format(date);
}