Add the ZoomDensity support in the Browser.
Per Leland's requst, change "Set text size" to "Text size" and etc.
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 68438b3..d80fedf 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -90,6 +90,8 @@
private static int defaultFixedFontSize = 13;
private static WebSettings.TextSize textSize =
WebSettings.TextSize.NORMAL;
+ private static WebSettings.ZoomDensity zoomDensity =
+ WebSettings.ZoomDensity.MEDIUM;
// Preference keys that are used outside this class
public final static String PREF_CLEAR_CACHE = "privacy_clear_cache";
@@ -105,6 +107,7 @@
public final static String PREF_DEBUG_SETTINGS = "debug_menu";
public final static String PREF_GEARS_SETTINGS = "gears_settings";
public final static String PREF_TEXT_SIZE = "text_size";
+ public final static String PREF_DEFAULT_ZOOM = "default_zoom";
public final static String PREF_DEFAULT_TEXT_ENCODING =
"default_text_encoding";
@@ -169,6 +172,7 @@
s.setDefaultFixedFontSize(b.defaultFixedFontSize);
s.setNavDump(b.navDump);
s.setTextSize(b.textSize);
+ s.setDefaultZoom(b.zoomDensity);
s.setLightTouchEnabled(b.lightTouch);
s.setSaveFormData(b.saveFormData);
s.setSavePassword(b.rememberPasswords);
@@ -236,6 +240,8 @@
loginInitialized = p.getBoolean("login_initialized", loginInitialized);
textSize = WebSettings.TextSize.valueOf(
p.getString(PREF_TEXT_SIZE, textSize.name()));
+ zoomDensity = WebSettings.ZoomDensity.valueOf(
+ p.getString(PREF_DEFAULT_ZOOM, zoomDensity.name()));
autoFitPage = p.getBoolean("autofit_pages", autoFitPage);
useWideViewPort = true; // use wide view port for either setting
if (autoFitPage) {
@@ -310,6 +316,10 @@
return textSize;
}
+ public WebSettings.ZoomDensity getDefaultZoom() {
+ return zoomDensity;
+ }
+
public boolean openInBackground() {
return openInBackground;
}