summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt18
-rw-r--r--core/java/android/webkit/WebSettings.java11
-rw-r--r--core/java/android/webkit/WebView.java29
3 files changed, 49 insertions, 9 deletions
diff --git a/api/current.txt b/api/current.txt
index e1bff146aac7..13263076272c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -27067,7 +27067,7 @@ package android.webkit {
}
public abstract class WebSettings {
- method public boolean enableSmoothTransition();
+ method public deprecated boolean enableSmoothTransition();
method public boolean getAllowContentAccess();
method public boolean getAllowFileAccess();
method public abstract boolean getAllowFileAccessFromFileURLs();
@@ -27133,7 +27133,7 @@ package android.webkit {
method public void setDefaultZoom(android.webkit.WebSettings.ZoomDensity);
method public void setDisplayZoomControls(boolean);
method public synchronized void setDomStorageEnabled(boolean);
- method public void setEnableSmoothTransition(boolean);
+ method public deprecated void setEnableSmoothTransition(boolean);
method public synchronized void setFantasyFontFamily(java.lang.String);
method public synchronized void setFixedFontFamily(java.lang.String);
method public synchronized void setGeolocationDatabasePath(java.lang.String);
@@ -27172,7 +27172,7 @@ package android.webkit {
field public static final int LOAD_CACHE_ELSE_NETWORK = 1; // 0x1
field public static final int LOAD_CACHE_ONLY = 3; // 0x3
field public static final int LOAD_DEFAULT = -1; // 0xffffffff
- field public static final int LOAD_NORMAL = 0; // 0x0
+ field public static final deprecated int LOAD_NORMAL = 0; // 0x0
field public static final int LOAD_NO_CACHE = 2; // 0x2
}
@@ -27255,13 +27255,13 @@ package android.webkit {
ctor public WebView(android.content.Context);
ctor public WebView(android.content.Context, android.util.AttributeSet);
ctor public WebView(android.content.Context, android.util.AttributeSet, int);
- ctor public WebView(android.content.Context, android.util.AttributeSet, int, boolean);
+ ctor public deprecated WebView(android.content.Context, android.util.AttributeSet, int, boolean);
method public void addJavascriptInterface(java.lang.Object, java.lang.String);
method public boolean canGoBack();
method public boolean canGoBackOrForward(int);
method public boolean canGoForward();
- method public boolean canZoomIn();
- method public boolean canZoomOut();
+ method public deprecated boolean canZoomIn();
+ method public deprecated boolean canZoomOut();
method public android.graphics.Picture capturePicture();
method public void clearCache(boolean);
method public void clearFormData();
@@ -27289,7 +27289,7 @@ package android.webkit {
method public java.lang.String[] getHttpAuthUsernamePassword(java.lang.String, java.lang.String);
method public java.lang.String getOriginalUrl();
method public int getProgress();
- method public float getScale();
+ method public deprecated float getScale();
method public android.webkit.WebSettings getSettings();
method public java.lang.String getTitle();
method public java.lang.String getUrl();
@@ -27326,13 +27326,13 @@ package android.webkit {
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>);
- method public void setCertificate(android.net.http.SslCertificate);
+ method public deprecated void setCertificate(android.net.http.SslCertificate);
method public void setDownloadListener(android.webkit.DownloadListener);
method public void setFindListener(android.webkit.WebView.FindListener);
method public void setHorizontalScrollbarOverlay(boolean);
method public void setHttpAuthUsernamePassword(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
method public void setInitialScale(int);
- method public void setMapTrackballToArrowKeys(boolean);
+ method public deprecated void setMapTrackballToArrowKeys(boolean);
method public void setNetworkAvailable(boolean);
method public deprecated void setPictureListener(android.webkit.WebView.PictureListener);
method public void setVerticalScrollbarOverlay(boolean);
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index e8ff01f7e449..a29ff3715fd0 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -102,7 +102,12 @@ public abstract class WebSettings {
/**
* Normal cache usage mode. Use with {@link #setCacheMode}.
+ *
+ * @deprecated This value is obsolete, as from API level
+ * {@link android.os.Build.VERSION_CODES#HONEYCOMB} and onwards it has the
+ * same effect as {@link #LOAD_DEFAULT}.
*/
+ @Deprecated
public static final int LOAD_NORMAL = 0;
/**
@@ -333,7 +338,10 @@ public abstract class WebSettings {
* If it is true, WebView will choose a solution to maximize the performance.
* e.g. the WebView's content may not be updated during the transition.
* If it is false, WebView will keep its fidelity. The default value is false.
+ *
+ * @deprecated This method is now obsolete, and will become a no-op in future.
*/
+ @Deprecated
public void setEnableSmoothTransition(boolean enable) {
throw new MustOverrideException();
}
@@ -343,7 +351,10 @@ public abstract class WebSettings {
* zooming.
*
* @see #setEnableSmoothTransition
+ *
+ * @deprecated This method is now obsolete, and will become a no-op in future.
*/
+ @Deprecated
public boolean enableSmoothTransition() {
throw new MustOverrideException();
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9d6d929a8f78..35993f6d6418 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -470,7 +470,13 @@ public class WebView extends AbsoluteLayout
* @param defStyle the default style resource ID
* @param privateBrowsing whether this WebView will be initialized in
* private mode
+ *
+ * @deprecated Private browsing is no longer supported directly via
+ * WebView and will be removed in a future release. Prefer using
+ * {@link WebSettings}, {@link WebViewDatabase}, {@link CookieManager}
+ * and {@link WebStorage} for fine-grained control of privacy data.
*/
+ @Deprecated
public WebView(Context context, AttributeSet attrs, int defStyle,
boolean privateBrowsing) {
this(context, attrs, defStyle, null, privateBrowsing);
@@ -569,7 +575,11 @@ public class WebView extends AbsoluteLayout
/**
* Sets the SSL certificate for the main top-level page.
+ *
+ * @deprecated Calling this function has no useful effect, and will be
+ * ignored in future releases.
*/
+ @Deprecated
public void setCertificate(SslCertificate certificate) {
checkThread();
mProvider.setCertificate(certificate);
@@ -1018,7 +1028,12 @@ public class WebView extends AbsoluteLayout
* Gets the current scale of this WebView.
*
* @return the current scale
+ *
+ * @deprecated This method is prone to inaccuracy due to race conditions
+ * between the web rendering and UI threads; prefer
+ * {@link WebViewClient#onScaleChanged}.
*/
+ @Deprecated
@ViewDebug.ExportedProperty(category = "webview")
public float getScale() {
checkThread();
@@ -1598,6 +1613,10 @@ public class WebView extends AbsoluteLayout
public void onGlobalFocusChanged(View oldFocus, View newFocus) {
}
+ /**
+ * @deprecated Only the default case, true, will be supported in a future version.
+ */
+ @Deprecated
public void setMapTrackballToArrowKeys(boolean setMap) {
checkThread();
mProvider.setMapTrackballToArrowKeys(setMap);
@@ -1631,7 +1650,12 @@ public class WebView extends AbsoluteLayout
* Gets whether this WebView can be zoomed in.
*
* @return true if this WebView can be zoomed in
+ *
+ * @deprecated This method is prone to inaccuracy due to race conditions
+ * between the web rendering and UI threads; prefer
+ * {@link WebViewClient#onScaleChanged}.
*/
+ @Deprecated
public boolean canZoomIn() {
checkThread();
return mProvider.canZoomIn();
@@ -1641,7 +1665,12 @@ public class WebView extends AbsoluteLayout
* Gets whether this WebView can be zoomed out.
*
* @return true if this WebView can be zoomed out
+ *
+ * @deprecated This method is prone to inaccuracy due to race conditions
+ * between the web rendering and UI threads; prefer
+ * {@link WebViewClient#onScaleChanged}.
*/
+ @Deprecated
public boolean canZoomOut() {
checkThread();
return mProvider.canZoomOut();