Hello,
I'm facing an issue with ContextImpl.java's getExternalFilesDir method.
(Link:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/app/ContextImpl.java#ContextImpl.getExternalFilesDir%28java.lang.String%29
)

This method looks at whether the /sdcard/Android/data/<package-name>/
directory exists for a given package.
If not, it first tries to create a .nomedia file at /sdcard/Android/data
and then calls mkdirs() to create /sdcard/Android/data/<package-name>/files.

The issue is that when it tries to create .nomedia file the first time,
/sdcard/Android directory does not exist and this call fails. The next
mkdirs() call to create the package's folder succeeds and further calls to
this method (from other packages) create the .nomedia file correctly.

Is this a bug? Can I change the order of lines in ContextImpl.java so that
the directories are created first and then the .nomedia file?
Or should something else be creating the /sdcard/Android/data directory
before an app can invoke this getExternalFilesDir() method?

Thanks,
Anusha

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to