Loading api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -232537,6 +232537,17 @@ visibility="public" > </method> <method name="getAllowContentAccess" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getAllowFileAccess" return="boolean" abstract="false" Loading Loading @@ -232955,6 +232966,19 @@ visibility="public" > </method> <method name="setAllowContentAccess" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="allow" type="boolean"> </parameter> </method> <method name="setAllowFileAccess" return="void" abstract="false" core/java/android/webkit/BrowserFrame.java +2 −1 Original line number Diff line number Diff line Loading @@ -738,7 +738,8 @@ class BrowserFrame extends Handler { } // content:// } else if (url.startsWith(ANDROID_CONTENT)) { } else if (mSettings.getAllowContentAccess() && url.startsWith(ANDROID_CONTENT)) { try { // Strip off mimetype, for compatibility with ContentLoader.java // If we don't do this, we can fail to load Gmail attachments, Loading core/java/android/webkit/FrameLoader.java +2 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,8 @@ class FrameLoader { settings.getAllowFileAccess())).sendToTarget(); } return true; } else if (URLUtil.isContentUrl(url)) { } else if (settings.getAllowContentAccess() && URLUtil.isContentUrl(url)) { // Send the raw url to the ContentLoader because it will do a // permission check and the url has to match. if (loadListener.isSynchronous()) { Loading core/java/android/webkit/WebSettings.java +20 −1 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ public class WebSettings { private boolean mBuiltInZoomControls = false; private boolean mDisplayZoomControls = true; private boolean mAllowFileAccess = true; private boolean mAllowContentAccess = true; private boolean mLoadWithOverviewMode = false; private boolean mEnableSmoothTransition = false; Loading Loading @@ -587,7 +588,9 @@ public class WebSettings { /** * Enable or disable file access within WebView. File access is enabled by * default. * default. Note that this enables or disables file system access only. * Assets and resources are still accessible using file:///android_asset and * file:///android_res. */ public void setAllowFileAccess(boolean allow) { mAllowFileAccess = allow; Loading @@ -600,6 +603,22 @@ public class WebSettings { return mAllowFileAccess; } /** * Enable or disable content url access within WebView. Content url access * allows WebView to load content from a content provider installed in the * system. The default is enabled. */ public void setAllowContentAccess(boolean allow) { mAllowContentAccess = allow; } /** * Returns true if this WebView supports content url access. */ public boolean getAllowContentAccess() { return mAllowContentAccess; } /** * Set whether the WebView loads a page with overview mode. */ Loading Loading
api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -232537,6 +232537,17 @@ visibility="public" > </method> <method name="getAllowContentAccess" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getAllowFileAccess" return="boolean" abstract="false" Loading Loading @@ -232955,6 +232966,19 @@ visibility="public" > </method> <method name="setAllowContentAccess" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="allow" type="boolean"> </parameter> </method> <method name="setAllowFileAccess" return="void" abstract="false"
core/java/android/webkit/BrowserFrame.java +2 −1 Original line number Diff line number Diff line Loading @@ -738,7 +738,8 @@ class BrowserFrame extends Handler { } // content:// } else if (url.startsWith(ANDROID_CONTENT)) { } else if (mSettings.getAllowContentAccess() && url.startsWith(ANDROID_CONTENT)) { try { // Strip off mimetype, for compatibility with ContentLoader.java // If we don't do this, we can fail to load Gmail attachments, Loading
core/java/android/webkit/FrameLoader.java +2 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,8 @@ class FrameLoader { settings.getAllowFileAccess())).sendToTarget(); } return true; } else if (URLUtil.isContentUrl(url)) { } else if (settings.getAllowContentAccess() && URLUtil.isContentUrl(url)) { // Send the raw url to the ContentLoader because it will do a // permission check and the url has to match. if (loadListener.isSynchronous()) { Loading
core/java/android/webkit/WebSettings.java +20 −1 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ public class WebSettings { private boolean mBuiltInZoomControls = false; private boolean mDisplayZoomControls = true; private boolean mAllowFileAccess = true; private boolean mAllowContentAccess = true; private boolean mLoadWithOverviewMode = false; private boolean mEnableSmoothTransition = false; Loading Loading @@ -587,7 +588,9 @@ public class WebSettings { /** * Enable or disable file access within WebView. File access is enabled by * default. * default. Note that this enables or disables file system access only. * Assets and resources are still accessible using file:///android_asset and * file:///android_res. */ public void setAllowFileAccess(boolean allow) { mAllowFileAccess = allow; Loading @@ -600,6 +603,22 @@ public class WebSettings { return mAllowFileAccess; } /** * Enable or disable content url access within WebView. Content url access * allows WebView to load content from a content provider installed in the * system. The default is enabled. */ public void setAllowContentAccess(boolean allow) { mAllowContentAccess = allow; } /** * Returns true if this WebView supports content url access. */ public boolean getAllowContentAccess() { return mAllowContentAccess; } /** * Set whether the WebView loads a page with overview mode. */ Loading