summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-02-18 09:13:12 -0500
committerPatrick Scott <phanna@android.com>2010-02-18 16:12:28 -0500
commitf43113f6216efacc3957fc48d9fa1c0326facceb (patch)
tree064470eff7e70a6e1cdd08b35d12577500c40fe0 /core/java
parent5706329cf42db714582fa698eb9f408350276f16 (diff)
downloadframeworks_base-f43113f6216efacc3957fc48d9fa1c0326facceb.zip
frameworks_base-f43113f6216efacc3957fc48d9fa1c0326facceb.tar.gz
frameworks_base-f43113f6216efacc3957fc48d9fa1c0326facceb.tar.bz2
Unhide setBlockNetworkLoads.
Blocking network images is not as secure as completely blocking network loads. Leave setBlockNetworkImage so clients can reduce bandwidth by disabling remote images. This will allow file:// and content:// URIs to load.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/WebSettings.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 39e5275..662be95 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -916,9 +916,12 @@ public class WebSettings {
}
/**
- * Tell the WebView to block network image. This is only checked when
- * getLoadsImagesAutomatically() is true.
- * @param flag True if the WebView should block network image
+ * Tell the WebView to block network images. This is only checked when
+ * {@link #getLoadsImagesAutomatically} is true. If you set the value to
+ * false, images will automatically be loaded. Use this api to reduce
+ * bandwidth only. Use {@link #setBlockNetworkLoads} if possible.
+ * @param flag True if the WebView should block network images.
+ * @see #setBlockNetworkLoads
*/
public synchronized void setBlockNetworkImage(boolean flag) {
if (mBlockNetworkImage != flag) {
@@ -928,17 +931,21 @@ public class WebSettings {
}
/**
- * Return true if the WebView will block network image. The default is false.
- * @return True if the WebView blocks network image.
+ * Return true if the WebView will block network images. The default is
+ * false.
+ * @return True if the WebView blocks network images.
*/
public synchronized boolean getBlockNetworkImage() {
return mBlockNetworkImage;
}
/**
- * @hide
- * Tell the WebView to block all network load requests.
- * @param flag True if the WebView should block all network loads
+ * Tell the WebView to block all network load requests. If you set the
+ * value to false, you must call {@link android.webkit.WebView#reload} to
+ * fetch remote resources. This flag supercedes the value passed to
+ * {@link #setBlockNetworkImage}.
+ * @param flag True if the WebView should block all network loads.
+ * @see android.webkit.WebView#reload
*/
public synchronized void setBlockNetworkLoads(boolean flag) {
if (mBlockNetworkLoads != flag) {
@@ -948,9 +955,8 @@ public class WebSettings {
}
/**
- * @hide
- * Return true if the WebView will block all network loads.
- * The default is false.
+ * Return true if the WebView will block all network loads. The default is
+ * false.
* @return True if the WebView blocks all network loads.
*/
public synchronized boolean getBlockNetworkLoads() {