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
dc6c5749
Commit
dc6c5749
authored
9 years ago
by
Marco Nelissen
Browse files
Options
Download
Email Patches
Plain Diff
Throw correct exception for null paths
Bug: 22519119 Change-Id: I8aff294201dfd8ec46ff3d30e4ceecea1346f29b
parent
55f76906
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/com/android/providers/media/MediaProvider.java
src/com/android/providers/media/MediaProvider.java
+5
-1
No files found.
src/com/android/providers/media/MediaProvider.java
View file @
dc6c5749
...
...
@@ -4627,7 +4627,11 @@ public class MediaProvider extends ContentProvider {
throw
new
FileNotFoundException
(
"No entry for "
+
uri
);
case
1
:
if
(
cursor
.
moveToFirst
())
{
return
new
File
(
cursor
.
getString
(
0
));
String
data
=
cursor
.
getString
(
0
);
if
(
data
==
null
)
{
throw
new
FileNotFoundException
(
"Null path for "
+
uri
);
}
return
new
File
(
data
);
}
else
{
throw
new
FileNotFoundException
(
"Unable to read entry for "
+
uri
);
}
...
...
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