Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_providers_MediaProvider
Commits
53232e55
Commit
53232e55
authored
9 years ago
by
Marco Nelissen
Committed by
The Android Automerger
9 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Create folder for insertion if needed
Bug: 26928703 Change-Id: I871e3346bfe23dfccf6635d7318ae8e4e48a9741
parent
faee7a21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/com/android/providers/media/MediaProvider.java
src/com/android/providers/media/MediaProvider.java
+6
-2
No files found.
src/com/android/providers/media/MediaProvider.java
View file @
53232e55
...
...
@@ -3065,7 +3065,8 @@ public class MediaProvider extends ContentProvider {
switch
(
mediaType
)
{
case
FileColumns
.
MEDIA_TYPE_IMAGE
:
{
values
=
ensureFile
(
helper
.
mInternal
,
initialValues
,
".jpg"
,
"Pictures"
);
values
=
ensureFile
(
helper
.
mInternal
,
initialValues
,
".jpg"
,
Environment
.
DIRECTORY_PICTURES
);
values
.
put
(
MediaStore
.
MediaColumns
.
DATE_ADDED
,
System
.
currentTimeMillis
()
/
1000
);
String
data
=
values
.
getAsString
(
MediaColumns
.
DATA
);
...
...
@@ -3840,7 +3841,10 @@ public class MediaProvider extends ContentProvider {
// return Environment.getDataDirectory()
// + "/" + directoryName + "/" + name + preferredExtension;
}
else
{
return
mExternalStoragePaths
[
0
]
+
"/"
+
directoryName
+
"/"
+
name
+
preferredExtension
;
String
dirPath
=
mExternalStoragePaths
[
0
]
+
"/"
+
directoryName
;
File
dirFile
=
new
File
(
dirPath
);
dirFile
.
mkdirs
();
return
dirPath
+
"/"
+
name
+
preferredExtension
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment