Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a82acdb authored by Martin Kosiba's avatar Martin Kosiba Committed by Marcin Kosiba
Browse files

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
parent ae62d71d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36826,7 +36826,7 @@ package android.webkit {
    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=";
+2 −4
Original line number Diff line number Diff line
@@ -1939,16 +1939,14 @@ public class WebView extends AbsoluteLayout
     *
     * @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);
    }

    /**