Revert "Hooking memory pressure signal to freeMemory in debug builds."
This reverts commit 767c3f7e0a6bffb9f3e17ec565610b178c4a3f95.
Change-Id: I09454cdc4d72baff1b200c8832ea9268e138bd0a
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromium.java b/chromium/java/com/android/webview/chromium/WebViewChromium.java
index f1343c0..12c1567 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromium.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromium.java
@@ -16,7 +16,6 @@
package com.android.webview.chromium;
-import android.content.ComponentCallbacks2;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -55,7 +54,6 @@
import org.chromium.android_webview.AwBrowserContext;
import org.chromium.android_webview.AwContents;
-import org.chromium.base.MemoryPressureListener;
import org.chromium.base.ThreadUtils;
import org.chromium.content.browser.LoadUrlParams;
import org.chromium.net.NetworkChangeNotifier;
@@ -590,14 +588,7 @@
@Override
public void freeMemory() {
checkThread();
- // This method is not intended to have any effect on release builds,
- // since memory is managed automatically by Chromium.
- // However, in debug builds, this method is exploited by our WebView
- // memory benchmarks to synthesize the memory pressure signal.
- if (Build.IS_DEBUGGABLE) {
- MemoryPressureListener.simulateMemoryPressureSignal(
- ComponentCallbacks2.TRIM_MEMORY_COMPLETE);
- }
+ // Intentional no-op. Memory is managed automatically by Chromium.
}
@Override