summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2013-02-25 12:29:33 -0800
committerJonathan Dixon <joth@google.com>2013-02-28 13:01:48 -0800
commit835b1fcc3193e0860ec33cca1c4cdff31f409473 (patch)
tree743e67f4488839da51f73f094e71bc78ab546499 /core/java/android
parent42bd71e0319e8c38f7439849fef3e8a9111006be (diff)
Deprecate various WebView related methods
WebSettings: PluginState - plugins depreacted and will not be supported in future. setRenderPriotity - b/6335436 setLightTouchEnabled - b/7683972 it's s no-op. setAppCacheMaxSize - has a sensible default and will be obsolete in future with HTML Quota Management API. b/6236763 WebStorage.setQuotaForOrigin - same as setAppCacheMaxSize WebView: clearView, showFindDialog - buggy, can be achieved otherways savePassword - not useful/usable in practice; see b/5012826 - stock browser used hidden APIs to achieve this feature WebIconDatabase: Other than the open() method, this does nothing useful. b/7331507 Change-Id: I01793f7b34978046eb54033477fca2da96e69c2e
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/webkit/WebIconDatabase.java8
-rw-r--r--core/java/android/webkit/WebSettings.java22
-rw-r--r--core/java/android/webkit/WebStorage.java2
-rw-r--r--core/java/android/webkit/WebView.java9
4 files changed, 38 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebIconDatabase.java b/core/java/android/webkit/WebIconDatabase.java
index 99f20fffd1d2..787997bd2096 100644
--- a/core/java/android/webkit/WebIconDatabase.java
+++ b/core/java/android/webkit/WebIconDatabase.java
@@ -25,11 +25,19 @@ import android.graphics.Bitmap;
* and WebView.getIconDatabase() will return a WebIconDatabase object. This
* WebIconDatabase object is a single instance and all methods operate on that
* single object.
+ * The main use-case for this class is calling {@link WebIconDatabase#open()}
+ * to enable favicon functionality on all WebView instances in this process.
+ *
+ * @deprecated This class is only required when running on devices
+ * up to {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/
+@Deprecated
public class WebIconDatabase {
/**
* Interface for receiving icons from the database.
+ * @deprecated
*/
+ @Deprecated
public interface IconListener {
/**
* Called when the icon has been retrieved from the database and the
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 728bcd3e545d..a69c8cfd713b 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -422,7 +422,9 @@ public abstract class WebSettings {
/**
* Sets whether the WebView should save passwords. The default is true.
+ * @deprecated Saving passwords in WebView will not be supported in future versions.
*/
+ @Deprecated
public void setSavePassword(boolean save) {
throw new MustOverrideException();
}
@@ -432,7 +434,9 @@ public abstract class WebSettings {
*
* @return whether the WebView saves passwords
* @see #setSavePassword
+ * @deprecated Saving passwords in WebView will not be supported in future versions.
*/
+ @Deprecated
public boolean getSavePassword() {
throw new MustOverrideException();
}
@@ -515,18 +519,20 @@ public abstract class WebSettings {
/**
* Enables using light touches to make a selection and activate mouseovers.
- * The default is false.
+ * @deprecated From {@link android.os.Build.VERSION_CODES#JELLY_BEAN} this
+ * setting is obsolete and has no effect.
*/
+ @Deprecated
public void setLightTouchEnabled(boolean enabled) {
throw new MustOverrideException();
}
/**
* Gets whether light touches are enabled.
- *
- * @return whether light touches are enabled
* @see #setLightTouchEnabled
+ * @deprecated
*/
+ @Deprecated
public boolean getLightTouchEnabled() {
throw new MustOverrideException();
}
@@ -1012,7 +1018,9 @@ public abstract class WebSettings {
* {@link PluginState#OFF}.
*
* @param state a PluginState value
+ * @deprecated Plugins will not be supported in future, and should not be used.
*/
+ @Deprecated
public synchronized void setPluginState(PluginState state) {
throw new MustOverrideException();
}
@@ -1091,9 +1099,12 @@ public abstract class WebSettings {
* this should be viewed as a guide, not a hard limit. Setting the
* size to a value less than current database size does not cause the
* database to be trimmed. The default size is {@link Long#MAX_VALUE}.
+ * It is recommended to leave the maximum size set to the default value.
*
* @param appCacheMaxSize the maximum size in bytes
+ * @deprecated In future quota will be managed automatically.
*/
+ @Deprecated
public synchronized void setAppCacheMaxSize(long appCacheMaxSize) {
throw new MustOverrideException();
}
@@ -1219,7 +1230,9 @@ public abstract class WebSettings {
*
* @return the plugin state as a {@link PluginState} value
* @see #setPluginState
+ * @deprecated Plugins will not be supported in future, and should not be used.
*/
+ @Deprecated
public synchronized PluginState getPluginState() {
throw new MustOverrideException();
}
@@ -1324,7 +1337,10 @@ public abstract class WebSettings {
* {@link RenderPriority#NORMAL}.
*
* @param priority the priority
+ * @deprecated It is not recommended to adjust thread priorities, and this will
+ * not be supported in future versions.
*/
+ @Deprecated
public synchronized void setRenderPriority(RenderPriority priority) {
throw new MustOverrideException();
}
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index 1e955bd3b2ef..7d9373ceef15 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -171,7 +171,9 @@ public class WebStorage {
* The quota is specified in bytes and the origin is specified using its string
* representation. Note that a quota is not enforced on a per-origin basis
* for the Application Cache API.
+ * @deprecated Controlling quota per-origin will not be supported in future.
*/
+ @Deprecated
public void setQuotaForOrigin(String origin, long quota) {
// Must be a no-op for backward compatibility: see the hidden constructor for reason.
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 13215155d24d..f780193341fe 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -601,7 +601,9 @@ public class WebView extends AbsoluteLayout
* @param password the password for the given host
* @see WebViewDatabase#clearUsernamePassword
* @see WebViewDatabase#hasUsernamePassword
+ * @deprecated Saving passwords in WebView will not be supported in future versions.
*/
+ @Deprecated
public void savePassword(String host, String username, String password) {
checkThread();
mProvider.savePassword(host, username, password);
@@ -998,7 +1000,10 @@ public class WebView extends AbsoluteLayout
/**
* Clears this WebView so that onDraw() will draw nothing but white background,
* and onMeasure() will return 0 if MeasureSpec is not MeasureSpec.EXACTLY.
+ * @deprecated Use WebView.loadUrl("about:blank") to reliably reset the view state
+ * and release page resources (including any running JavaScript).
*/
+ @Deprecated
public void clearView() {
checkThread();
mProvider.clearView();
@@ -1388,7 +1393,11 @@ public class WebView extends AbsoluteLayout
* @param showIme if true, show the IME, assuming the user will begin typing.
* If false and text is non-null, perform a find all.
* @return true if the find dialog is shown, false otherwise
+ * @deprecated This method does not work reliably on all Android versions;
+ * implementing a custom find dialog using WebView.findAllAsync()
+ * provides a more robust solution.
*/
+ @Deprecated
public boolean showFindDialog(String text, boolean showIme) {
checkThread();
return mProvider.showFindDialog(text, showIme);