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

Commit b1ee70b1 authored by Hui Shu's avatar Hui Shu
Browse files

Add API for WebView OffscreenPreRaster setting.

BUG: 19592029
Change-Id: Ic903b823e5f7830e2cf2d4f3dd9a5458334648a3
parent 4939e2bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36940,6 +36940,7 @@ package android.webkit {
    method public abstract int getMinimumFontSize();
    method public abstract int getMinimumLogicalFontSize();
    method public abstract int getMixedContentMode();
    method public abstract boolean getOffscreenPreRaster();
    method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
    method public abstract java.lang.String getSansSerifFontFamily();
    method public abstract boolean getSaveFormData();
@@ -36986,6 +36987,7 @@ package android.webkit {
    method public abstract void setMinimumLogicalFontSize(int);
    method public abstract void setMixedContentMode(int);
    method public abstract void setNeedInitialFocus(boolean);
    method public abstract void setOffscreenPreRaster(boolean);
    method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
    method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
    method public abstract void setSansSerifFontFamily(java.lang.String);
+3 −1
Original line number Diff line number Diff line
@@ -30893,8 +30893,8 @@ package android.telecom {
    method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
    field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
    field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
    field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
    field public static final java.lang.String ACTION_PHONE_ACCOUNT_REGISTERED = "android.telecom.action.PHONE_ACCOUNT_REGISTERED";
    field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
    field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
    field public static final java.lang.String ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS = "android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
    field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
@@ -39165,6 +39165,7 @@ package android.webkit {
    method public abstract int getMinimumLogicalFontSize();
    method public abstract int getMixedContentMode();
    method public abstract deprecated boolean getNavDump();
    method public abstract boolean getOffscreenPreRaster();
    method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
    method public abstract deprecated boolean getPluginsEnabled();
    method public abstract java.lang.String getSansSerifFontFamily();
@@ -39217,6 +39218,7 @@ package android.webkit {
    method public abstract void setMixedContentMode(int);
    method public abstract deprecated void setNavDump(boolean);
    method public abstract void setNeedInitialFocus(boolean);
    method public abstract void setOffscreenPreRaster(boolean);
    method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
    method public abstract deprecated void setPluginsEnabled(boolean);
    method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
+21 −0
Original line number Diff line number Diff line
@@ -1330,4 +1330,25 @@ public abstract class WebSettings {
     */
    @SystemApi
    public abstract boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled();

    /**
     * Sets whether this WebView should raster tiles when it is
     * offscreen but attached to a window. Turning this on can avoid
     * rendering artifacts when animating an offscreen WebView on-screen.
     * Offscreen WebViews in this mode use more memory. The default value is
     * false.
     * Please follow these guidelines to limit memory usage:
     * - WebView size should be not be larger than the device screen size.
     * - Limit use of this mode to a small number of WebViews. Use it for
     *   visible WebViews and WebViews about to be animated to visible.
     */
    public abstract void setOffscreenPreRaster(boolean enabled);

    /**
     * Gets whether this WebView should raster tiles when it is
     * offscreen but attached to a window.
     * @return true if this WebView will raster tiles when it is
     * offscreen but attached to a window.
     */
    public abstract boolean getOffscreenPreRaster();
}