summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@android.com>2014-01-23 11:51:22 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-23 11:51:22 -0800
commitd9c2e3d30f7af615ae78848f6a7f52ed5c539d33 (patch)
tree1df9e7d196fb0641c05f38b1f363377c1b185f10 /core
parent8bc01824b999f097aa211c9de9e4dff6a0497432 (diff)
parent016075239fc28704bb0e2b78a3c5540fde711eea (diff)
downloadframeworks_base-d9c2e3d30f7af615ae78848f6a7f52ed5c539d33.zip
frameworks_base-d9c2e3d30f7af615ae78848f6a7f52ed5c539d33.tar.gz
frameworks_base-d9c2e3d30f7af615ae78848f6a7f52ed5c539d33.tar.bz2
am 01607523: am f6d69ae0: Merge "Adding freeMemoryForTests static method to WebView."
* commit '016075239fc28704bb0e2b78a3c5540fde711eea': Adding freeMemoryForTests static method to WebView.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/WebView.java9
-rw-r--r--core/java/android/webkit/WebViewFactoryProvider.java5
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 5bc39f1..f276e14 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -686,6 +686,15 @@ public class WebView extends AbsoluteLayout
}
/**
+ * 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
* generates the online/offline event as specified in HTML5, sec. 5.7.7
diff --git a/core/java/android/webkit/WebViewFactoryProvider.java b/core/java/android/webkit/WebViewFactoryProvider.java
index 9d9d882..e391aaf 100644
--- a/core/java/android/webkit/WebViewFactoryProvider.java
+++ b/core/java/android/webkit/WebViewFactoryProvider.java
@@ -50,6 +50,11 @@ public interface WebViewFactoryProvider {
String getDefaultUserAgent(Context context);
/**
+ * Used for tests only.
+ */
+ void freeMemoryForTests();
+
+ /**
* Implements the API method:
* {@link android.webkit.WebView#setWebContentsDebuggingEnabled(boolean) }
*/