diff options
author | Shih-chia Cheng <shihchia@google.com> | 2011-07-28 11:38:01 +0800 |
---|---|---|
committer | Shih-chia Cheng <shihchia@google.com> | 2011-07-28 11:57:03 +0800 |
commit | a2ae3e79b64426c53c46cbf175d1f26e26139798 (patch) | |
tree | 51f0670bb892455f8c7c5d6bdb76c3c8e6d04717 /src/com/android/videoeditor/util | |
parent | 52c1cec58b00df420c6a0b5a627d12eaf77462cf (diff) | |
download | VideoEditor-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-x | src/com/android/videoeditor/util/FileUtils.java | 5 |
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 { |