diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-04-09 14:06:16 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-04-10 14:43:58 -0700 |
commit | 162bc0ea0d7862b92f18d0ce47310a85304205f7 (patch) | |
tree | 7d7342164ba4c6dde86e3951bcd6b79dead4273e /core/java/android/webkit/WebViewClassic.java | |
parent | d3ce6f50c114f58a3f50e44764e9b315ac41f637 (diff) | |
download | frameworks_base-162bc0ea0d7862b92f18d0ce47310a85304205f7.zip frameworks_base-162bc0ea0d7862b92f18d0ce47310a85304205f7.tar.gz frameworks_base-162bc0ea0d7862b92f18d0ce47310a85304205f7.tar.bz2 |
Some small tweaks to improve memory management.
We now allow processes that currently have stopping activities to
be managed as if they were done stopping, so that memory trimming
can be done before the process goes to the background. Hopefully
this will reduce cases where the processes goes to the background
and immediately gets killed, but wouldn't have had to be killed if
it had a chance to trim its memory.
Also change window memory trimming to always do the aggressive
trimming when memory is critical, even if not on a low-end device.
And tweak web view trimming to not trim for foreground UI events.
Change-Id: I241b3152b52d09757bd14a202477cf69c9b78786
Diffstat (limited to 'core/java/android/webkit/WebViewClassic.java')
-rw-r--r-- | core/java/android/webkit/WebViewClassic.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 8dc3b7e..28af7c1 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -886,7 +886,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // the existing GL resources for the html5 video will be destroyed // at native side. // Here we just need to clean up the Surface Texture which is static. - HTML5VideoInline.cleanupSurfaceTexture(); + if (level >= TRIM_MEMORY_UI_HIDDEN) { + HTML5VideoInline.cleanupSurfaceTexture(); + } WebViewClassic.nativeOnTrimMemory(level); } |