Change WebView.zoomBy return type to void.
It turns out that the semantics of the return value are confusing
and so we decided to not return a result from this method at all.
The developer can call canZoomIn/canZoomOut to determine whether
the WebView is at the zoom limit, so there is no loss of
functionality.
BUG: 17374808
Change-Id: I4dfde71d5ac4a3f91c8755b257411aad06a1b1f6
diff --git a/api/current.txt b/api/current.txt
index a0d47e4..cdccaf0 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -36826,7 +36826,7 @@
method public void setWebViewClient(android.webkit.WebViewClient);
method public deprecated boolean showFindDialog(java.lang.String, boolean);
method public void stopLoading();
- method public boolean zoomBy(float);
+ method public void zoomBy(float);
method public boolean zoomIn();
method public boolean zoomOut();
field public static final java.lang.String SCHEME_GEO = "geo:0,0?q=";
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index edfa7af..081bfdf 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1939,16 +1939,14 @@
*
* @param zoomFactor the zoom factor to apply. The zoom factor will be clamped to the Webview's
* zoom limits. This value must be in the range 0.01 to 100.0 inclusive.
- *
- * @return false if no zoom changes, true otherwise.
*/
- public boolean zoomBy(float zoomFactor) {
+ public void zoomBy(float zoomFactor) {
checkThread();
if (zoomFactor < 0.01)
throw new IllegalArgumentException("zoomFactor must be greater than 0.01.");
if (zoomFactor > 100.0)
throw new IllegalArgumentException("zoomFactor must be less than 100.");
- return mProvider.zoomBy(zoomFactor);
+ mProvider.zoomBy(zoomFactor);
}
/**