diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-11-07 23:58:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-07 23:58:10 +0000 |
commit | 65ae8361b66f21af61971c56b2b3773665c92528 (patch) | |
tree | eafc2f17600230f8b3c3ef06904a5169318511bf | |
parent | d6cfe42d56c23ae0e0704922022c350724b2dd37 (diff) | |
parent | e7c44c2871ea595c8c3f879f19e8790083dbb84c (diff) | |
download | android_packages_apps_Gello-65ae8361b66f21af61971c56b2b3773665c92528.tar.gz android_packages_apps_Gello-65ae8361b66f21af61971c56b2b3773665c92528.tar.bz2 android_packages_apps_Gello-65ae8361b66f21af61971c56b2b3773665c92528.zip |
am e7c44c28: Merge "Add support to minimize the WebView\'s memory consumption by default" into ics-mr1
* commit 'e7c44c2871ea595c8c3f879f19e8790083dbb84c':
Add support to minimize the WebView's memory consumption by default
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 7 | ||||
-rw-r--r-- | src/com/android/browser/WebViewProperties.java | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index e2a521ae..0b8191ad 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); diff --git a/src/com/android/browser/WebViewProperties.java b/src/com/android/browser/WebViewProperties.java index c4100381..c6629579 100644 --- a/src/com/android/browser/WebViewProperties.java +++ b/src/com/android/browser/WebViewProperties.java @@ -19,4 +19,5 @@ public interface WebViewProperties { static final String gfxInvertedScreen = "inverted"; static final String gfxInvertedScreenContrast = "inverted_contrast"; static final String gfxEnableCpuUploadPath = "enable_cpu_upload_path"; + static final String gfxUseMinimalMemory = "use_minimal_memory"; } |