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

* commit '705665acda5fec6c8c76683b2e5850b0bd447449':
  Do not allow file:// access when it is disabled. Do not merge.
This commit is contained in:
Bart Sears
2012-01-04 13:49:54 -08:00
committed by Android Git Automerger

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 {