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

Commit f4e27232 authored by Primiano Tucci's avatar Primiano Tucci Committed by Bart Sears
Browse files

DO NOT MERGE: Adding freeMemoryForTests static method to WebView.

This is going to be used by pagecycler tests.
See: b/10629847

Change-Id: Ie3fda214e7808429d7ed63734ab301525f58513f
(cherry pick of 24426750)

Cherry pick to klp-dev as part of Bug: 13246014

Conflicts:
	core/java/android/webkit/WebViewClassic.java
	core/java/android/webkit/WebViewFactoryProvider.java
(cherry picked from commit 54daaf1cffddad6366fac2ccfceb1e042dd8e90e)

Change-Id: I8471ee5cfaac2ff72704c2391a1961f441aaa1e6
parent 7ab82a0c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -685,6 +685,16 @@ public class WebView extends AbsoluteLayout
        getFactory().getStatics().setPlatformNotificationsEnabled(false);
    }

    /**
     * Used only by internal tests to free up memory.
     *
     * @hide
     */
    public static void freeMemoryForTests() {
        checkThread();
        getFactory().getStatics().freeMemoryForTests();
    }

    /**
     * Informs WebView of the network state. This is used to set
     * the JavaScript property window.navigator.isOnline and
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ public interface WebViewFactoryProvider {
         */
        String getDefaultUserAgent(Context context);

        /**
         * Used for tests only.
         */
         void freeMemoryForTests();

        /**
         * Implements the API method:
         * {@link android.webkit.WebView#setWebContentsDebuggingEnabled(boolean) }