Merge "DO NOT MERGE: Adding freeMemoryForTests static method to WebView." into klp-dev

This commit is contained in:
Bart Sears
2014-03-03 18:42:27 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions

View File

@@ -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

View File

@@ -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) }