Loading core/java/android/webkit/WebView.java +10 −0 Original line number Diff line number Diff line Loading @@ -710,6 +710,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 Loading core/java/android/webkit/WebViewClassic.java +4 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc WebViewClassic.disablePlatformNotifications(); } } @Override public void freeMemoryForTests() { // noop. } @Override public Statics getStatics() { return this; } Loading core/java/android/webkit/WebViewFactoryProvider.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ public interface WebViewFactoryProvider { * {@link android.webkit.WebSettings#getDefaultUserAgent(Context) } */ String getDefaultUserAgent(Context context); /** * Used for tests only. */ void freeMemoryForTests(); } Statics getStatics(); Loading Loading
core/java/android/webkit/WebView.java +10 −0 Original line number Diff line number Diff line Loading @@ -710,6 +710,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 Loading
core/java/android/webkit/WebViewClassic.java +4 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc WebViewClassic.disablePlatformNotifications(); } } @Override public void freeMemoryForTests() { // noop. } @Override public Statics getStatics() { return this; } Loading
core/java/android/webkit/WebViewFactoryProvider.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ public interface WebViewFactoryProvider { * {@link android.webkit.WebSettings#getDefaultUserAgent(Context) } */ String getDefaultUserAgent(Context context); /** * Used for tests only. */ void freeMemoryForTests(); } Statics getStatics(); Loading