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
frameworks_base
Commits
67f29573
Commit
67f29573
authored
12 years ago
by
Jeff Sharkey
Committed by
Android Git Automerger
12 years ago
Browse files
Options
Download
Plain Diff
am
bb2aa63b
: am
a2e929e1
: Tighten enforcement of file modes.
* commit '
bb2aa63b
': Tighten enforcement of file modes.
parents
00158363
bb2aa63b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
core/java/android/content/ContentProvider.java
core/java/android/content/ContentProvider.java
+2
-2
No files found.
core/java/android/content/ContentProvider.java
View file @
67f29573
...
...
@@ -238,7 +238,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public
ParcelFileDescriptor
openFile
(
Uri
uri
,
String
mode
)
throws
FileNotFoundException
{
if
(
mode
!=
null
&&
mode
.
startsWith
(
"rw"
)
)
enforceWritePermission
(
uri
);
if
(
mode
!=
null
&&
mode
.
indexOf
(
'w'
)
!=
-
1
)
enforceWritePermission
(
uri
);
else
enforceReadPermission
(
uri
);
return
ContentProvider
.
this
.
openFile
(
uri
,
mode
);
}
...
...
@@ -246,7 +246,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public
AssetFileDescriptor
openAssetFile
(
Uri
uri
,
String
mode
)
throws
FileNotFoundException
{
if
(
mode
!=
null
&&
mode
.
startsWith
(
"rw"
)
)
enforceWritePermission
(
uri
);
if
(
mode
!=
null
&&
mode
.
indexOf
(
'w'
)
!=
-
1
)
enforceWritePermission
(
uri
);
else
enforceReadPermission
(
uri
);
return
ContentProvider
.
this
.
openAssetFile
(
uri
,
mode
);
}
...
...
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