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

Commit f4418b01 authored by Grace Kloba's avatar Grace Kloba
Browse files

Change api for webview overscroll background.

parent 15b487e4
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -193735,7 +193735,7 @@
 visibility="public"
 visibility="public"
>
>
</method>
</method>
<method name="getUseSystemOverscrollBackground"
<method name="getUseWebViewBackgroundForOverscrollBackground"
 return="boolean"
 return="boolean"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
@@ -194325,7 +194325,7 @@
<parameter name="use" type="boolean">
<parameter name="use" type="boolean">
</parameter>
</parameter>
</method>
</method>
<method name="setUseSystemOverscrollBackground"
<method name="setUseWebViewBackgroundForOverscrollBackground"
 return="void"
 return="void"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
@@ -194335,7 +194335,7 @@
 deprecated="not deprecated"
 deprecated="not deprecated"
 visibility="public"
 visibility="public"
>
>
<parameter name="system" type="boolean">
<parameter name="view" type="boolean">
</parameter>
</parameter>
</method>
</method>
<method name="setUseWideViewPort"
<method name="setUseWideViewPort"
+10 −10
Original line number Original line Diff line number Diff line
@@ -192,7 +192,7 @@ public class WebSettings {
    private boolean         mBuiltInZoomControls = false;
    private boolean         mBuiltInZoomControls = false;
    private boolean         mAllowFileAccess = true;
    private boolean         mAllowFileAccess = true;
    private boolean         mLoadWithOverviewMode = false;
    private boolean         mLoadWithOverviewMode = false;
    private boolean         mUseSystemOverscrollBackground = false;
    private boolean         mUseWebViewBackgroundOverscrollBackground = true;


    // private WebSettings, not accessible by the host activity
    // private WebSettings, not accessible by the host activity
    static private int      mDoubleTapToastCount = 3;
    static private int      mDoubleTapToastCount = 3;
@@ -471,20 +471,20 @@ public class WebSettings {
    }
    }


    /**
    /**
     * Set whether the WebView uses system background for over scroll
     * Set whether the WebView uses its background for over scroll background.
     * background. If false, it will use the WebView's background. Default is
     * If true, it will use the WebView's background. If false, it will use an
     * false.
     * internal pattern. Default is true.
     */
     */
    public void setUseSystemOverscrollBackground(boolean system) {
    public void setUseWebViewBackgroundForOverscrollBackground(boolean view) {
        mUseSystemOverscrollBackground = system;
        mUseWebViewBackgroundOverscrollBackground = view;
    }
    }


    /**
    /**
     * Returns true if this WebView uses system background instead of WebView
     * Returns true if this WebView uses WebView's background instead of
     * background for over scroll background.
     * internal pattern for over scroll background.
     */
     */
    public boolean getUseSystemOverscrollBackground() {
    public boolean getUseWebViewBackgroundForOverscrollBackground() {
        return mUseSystemOverscrollBackground;
        return mUseWebViewBackgroundOverscrollBackground;
    }
    }


    /**
    /**
+2 −2
Original line number Original line Diff line number Diff line
@@ -3120,8 +3120,8 @@ public class WebView extends AbsoluteLayout
        }
        }


        int saveCount = canvas.save();
        int saveCount = canvas.save();
        if (mInOverScrollMode
        if (mInOverScrollMode && !getSettings()
                && getSettings().getUseSystemOverscrollBackground()) {
                .getUseWebViewBackgroundForOverscrollBackground()) {
            if (mOverScrollBackground == null) {
            if (mOverScrollBackground == null) {
                mOverScrollBackground = new Paint();
                mOverScrollBackground = new Paint();
                Bitmap bm = BitmapFactory.decodeResource(
                Bitmap bm = BitmapFactory.decodeResource(