Merge "Do not allow file:// access when it is disabled. Do not merge." into ics-mr1

This commit is contained in:
Bart Sears
2012-01-04 13:47:09 -08:00
committed by Android (Google) Code Review

View File

@@ -941,6 +941,13 @@ class BrowserFrame extends Handler {
if (androidResource != null) {
return new WebResourceResponse(null, null, androidResource);
}
// Note that we check this after looking for an android_asset or
// android_res URL, as we allow those even if file access is disabled.
if (!mSettings.getAllowFileAccess() && url.startsWith("file://")) {
return new WebResourceResponse(null, null, null);
}
WebResourceResponse response = mCallbackProxy.shouldInterceptRequest(url);
if (response == null && "browser:incognito".equals(url)) {
try {