summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/providers/media/MediaProvider.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/providers/media/MediaProvider.java b/src/com/android/providers/media/MediaProvider.java
index 34e3d88c..498cf828 100755
--- a/src/com/android/providers/media/MediaProvider.java
+++ b/src/com/android/providers/media/MediaProvider.java
@@ -131,9 +131,13 @@ public class MediaProvider extends ContentProvider {
static {
try {
- sExternalPath = Environment.getExternalStorageDirectory().getCanonicalPath();
- sCachePath = Environment.getDownloadCacheDirectory().getCanonicalPath();
- sLegacyPath = Environment.getLegacyExternalStorageDirectory().getCanonicalPath();
+ sExternalPath =
+ Environment.getExternalStorageDirectory().getCanonicalPath() + File.separator;
+ sCachePath =
+ Environment.getDownloadCacheDirectory().getCanonicalPath() + File.separator;
+ sLegacyPath =
+ Environment.getLegacyExternalStorageDirectory().getCanonicalPath()
+ + File.separator;
} catch (IOException e) {
throw new RuntimeException("Unable to resolve canonical paths", e);
}
@@ -2998,7 +3002,7 @@ public class MediaProvider extends ContentProvider {
switch (mediaType) {
case FileColumns.MEDIA_TYPE_IMAGE: {
- values = ensureFile(helper.mInternal, initialValues, ".jpg", "DCIM/Camera");
+ values = ensureFile(helper.mInternal, initialValues, ".jpg", "Pictures");
values.put(MediaStore.MediaColumns.DATE_ADDED, System.currentTimeMillis() / 1000);
String data = values.getAsString(MediaColumns.DATA);