summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserSettings.java
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-11-07 12:54:43 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-11-07 13:53:12 -0800
commit164f74e38918ea01a5f631a7cf4d807d397c6a51 (patch)
tree574a385c5b915ac6f9f83077ef21ddc20bc76e14 /src/com/android/browser/BrowserSettings.java
parent91c61a5b3bd8de65e30a0ead6d1f634a6dc7a79f (diff)
downloadpackages_apps_Browser-164f74e38918ea01a5f631a7cf4d807d397c6a51.zip
packages_apps_Browser-164f74e38918ea01a5f631a7cf4d807d397c6a51.tar.gz
packages_apps_Browser-164f74e38918ea01a5f631a7cf4d807d397c6a51.tar.bz2
Add support to minimize the WebView's memory consumption by default
webkit change is c/148241 bug:5522175 Change-Id: I8562c39c55913ab89848afe8a36e8a2784c12727
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r--src/com/android/browser/BrowserSettings.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index e2a521a..0b8191a 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -301,6 +301,13 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
// enable smooth transition for better performance during panning or
// zooming
settings.setEnableSmoothTransition(true);
+ // WebView should be preserving the memory as much as possible.
+ // However, apps like browser wish to turn on the performance mode which
+ // would require more memory.
+ // TODO: We need to dynamically allocate/deallocate temporary memory for
+ // apps which are trying to use minimal memory. Currently, double
+ // buffering is always turned on, which is unnecessary.
+ settings.setProperty(WebViewProperties.gfxUseMinimalMemory, "false");
// disable content url access
settings.setAllowContentAccess(false);