summaryrefslogtreecommitdiff
path: root/src/com/android/videoeditor/util
diff options
context:
space:
mode:
authorShih-chia Cheng <shihchia@google.com>2011-07-28 11:38:01 +0800
committerShih-chia Cheng <shihchia@google.com>2011-07-28 11:57:03 +0800
commita2ae3e79b64426c53c46cbf175d1f26e26139798 (patch)
tree51f0670bb892455f8c7c5d6bdb76c3c8e6d04717 /src/com/android/videoeditor/util
parent52c1cec58b00df420c6a0b5a627d12eaf77462cf (diff)
downloadVideoEditor-a2ae3e79b64426c53c46cbf175d1f26e26139798.tar.gz
Rename ProjectPicker back to ProjectsActivity
This patch also fixes the bug that external storage for storing project data might not be mounted and makes project loading crash the video editor. Bug: 5086158, 5086978 Change-Id: I2b2aa3f2fd1d1dcd5f8272318cb9192cc48e216b
Diffstat (limited to 'src/com/android/videoeditor/util')
-rwxr-xr-xsrc/com/android/videoeditor/util/FileUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/videoeditor/util/FileUtils.java b/src/com/android/videoeditor/util/FileUtils.java
index c8d36a3..6ce2887 100755
--- a/src/com/android/videoeditor/util/FileUtils.java
+++ b/src/com/android/videoeditor/util/FileUtils.java
@@ -50,12 +50,13 @@ public class FileUtils {
*
* @param context The context
*
- * @return The file representing the projects root directory
+ * @return The file representing the projects root directory, {@code null} if the external
+ * storage is not currnetly mounted
*/
public static File getProjectsRootDir(Context context)
throws FileNotFoundException, IOException {
final File dir = context.getExternalFilesDir(null);
- if (!dir.exists()) {
+ if (dir != null && !dir.exists()) {
if (!dir.mkdirs()) {
throw new FileNotFoundException("Cannot create folder: " + dir.getAbsolutePath());
} else {