Merge "Deprecate various WebView related methods" into jb-mr2-dev

This commit is contained in:
Jonathan Dixon
2013-02-28 22:11:36 +00:00
committed by Android (Google) Code Review
5 changed files with 52 additions and 17 deletions

View File

@@ -27456,7 +27456,7 @@ package android.webkit {
method public java.lang.String getUrl();
}
public class WebIconDatabase {
public deprecated class WebIconDatabase {
method public void close();
method public static android.webkit.WebIconDatabase getInstance();
method public void open(java.lang.String);
@@ -27466,7 +27466,7 @@ package android.webkit {
method public void retainIconForPageUrl(java.lang.String);
}
public static abstract interface WebIconDatabase.IconListener {
public static abstract deprecated interface WebIconDatabase.IconListener {
method public abstract void onReceivedIcon(java.lang.String, android.graphics.Bitmap);
}
@@ -27505,18 +27505,18 @@ package android.webkit {
method public synchronized boolean getJavaScriptCanOpenWindowsAutomatically();
method public synchronized boolean getJavaScriptEnabled();
method public synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
method public boolean getLightTouchEnabled();
method public deprecated boolean getLightTouchEnabled();
method public boolean getLoadWithOverviewMode();
method public synchronized boolean getLoadsImagesAutomatically();
method public boolean getMediaPlaybackRequiresUserGesture();
method public synchronized int getMinimumFontSize();
method public synchronized int getMinimumLogicalFontSize();
method public synchronized android.webkit.WebSettings.PluginState getPluginState();
method public deprecated synchronized android.webkit.WebSettings.PluginState getPluginState();
method public deprecated synchronized boolean getPluginsEnabled();
method public deprecated synchronized java.lang.String getPluginsPath();
method public synchronized java.lang.String getSansSerifFontFamily();
method public boolean getSaveFormData();
method public boolean getSavePassword();
method public deprecated boolean getSavePassword();
method public synchronized java.lang.String getSerifFontFamily();
method public synchronized java.lang.String getStandardFontFamily();
method public deprecated synchronized android.webkit.WebSettings.TextSize getTextSize();
@@ -27528,7 +27528,7 @@ package android.webkit {
method public abstract void setAllowFileAccessFromFileURLs(boolean);
method public abstract void setAllowUniversalAccessFromFileURLs(boolean);
method public synchronized void setAppCacheEnabled(boolean);
method public synchronized void setAppCacheMaxSize(long);
method public deprecated synchronized void setAppCacheMaxSize(long);
method public synchronized void setAppCachePath(java.lang.String);
method public synchronized void setBlockNetworkImage(boolean);
method public synchronized void setBlockNetworkLoads(boolean);
@@ -27551,20 +27551,20 @@ package android.webkit {
method public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean);
method public synchronized void setJavaScriptEnabled(boolean);
method public synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm);
method public void setLightTouchEnabled(boolean);
method public deprecated void setLightTouchEnabled(boolean);
method public void setLoadWithOverviewMode(boolean);
method public synchronized void setLoadsImagesAutomatically(boolean);
method public void setMediaPlaybackRequiresUserGesture(boolean);
method public synchronized void setMinimumFontSize(int);
method public synchronized void setMinimumLogicalFontSize(int);
method public void setNeedInitialFocus(boolean);
method public synchronized void setPluginState(android.webkit.WebSettings.PluginState);
method public deprecated synchronized void setPluginState(android.webkit.WebSettings.PluginState);
method public deprecated synchronized void setPluginsEnabled(boolean);
method public deprecated synchronized void setPluginsPath(java.lang.String);
method public synchronized void setRenderPriority(android.webkit.WebSettings.RenderPriority);
method public deprecated synchronized void setRenderPriority(android.webkit.WebSettings.RenderPriority);
method public synchronized void setSansSerifFontFamily(java.lang.String);
method public void setSaveFormData(boolean);
method public void setSavePassword(boolean);
method public deprecated void setSavePassword(boolean);
method public synchronized void setSerifFontFamily(java.lang.String);
method public synchronized void setStandardFontFamily(java.lang.String);
method public synchronized void setSupportMultipleWindows(boolean);
@@ -27631,7 +27631,7 @@ package android.webkit {
method public void getOrigins(android.webkit.ValueCallback<java.util.Map>);
method public void getQuotaForOrigin(java.lang.String, android.webkit.ValueCallback<java.lang.Long>);
method public void getUsageForOrigin(java.lang.String, android.webkit.ValueCallback<java.lang.Long>);
method public void setQuotaForOrigin(java.lang.String, long);
method public deprecated void setQuotaForOrigin(java.lang.String, long);
}
public static class WebStorage.Origin {
@@ -27674,7 +27674,7 @@ package android.webkit {
method public void clearHistory();
method public void clearMatches();
method public void clearSslPreferences();
method public void clearView();
method public deprecated void clearView();
method public android.webkit.WebBackForwardList copyBackForwardList();
method public void destroy();
method public void documentHasImages(android.os.Message);
@@ -27721,7 +27721,7 @@ package android.webkit {
method public void requestImageRef(android.os.Message);
method public android.webkit.WebBackForwardList restoreState(android.os.Bundle);
method public void resumeTimers();
method public void savePassword(java.lang.String, java.lang.String, java.lang.String);
method public deprecated void savePassword(java.lang.String, java.lang.String, java.lang.String);
method public android.webkit.WebBackForwardList saveState(android.os.Bundle);
method public void saveWebArchive(java.lang.String);
method public void saveWebArchive(java.lang.String, boolean, android.webkit.ValueCallback<java.lang.String>);
@@ -27737,7 +27737,7 @@ package android.webkit {
method public void setVerticalScrollbarOverlay(boolean);
method public void setWebChromeClient(android.webkit.WebChromeClient);
method public void setWebViewClient(android.webkit.WebViewClient);
method public boolean showFindDialog(java.lang.String, boolean);
method public deprecated boolean showFindDialog(java.lang.String, boolean);
method public void stopLoading();
method public boolean zoomIn();
method public boolean zoomOut();

View File

@@ -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

View File

@@ -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();
}

View File

@@ -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.
}

View File

@@ -602,7 +602,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);
@@ -999,7 +1001,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();
@@ -1389,7 +1394,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);