summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserSettings.java
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2013-08-31 21:36:51 -0700
committerJonathan Dixon <joth@google.com>2013-10-24 12:31:04 -0700
commit5fd09fadb9a1544d5e091ca7150ac3a2c0b877cd (patch)
tree2835c0c1fd8a969e7b8fa664119ddf6be9d07013 /src/com/android/browser/BrowserSettings.java
parent6db358b96d81ca8162c945ddbdc47a527227c743 (diff)
downloadpackages_apps_Browser-5fd09fadb9a1544d5e091ca7150ac3a2c0b877cd.zip
packages_apps_Browser-5fd09fadb9a1544d5e091ca7150ac3a2c0b877cd.tar.gz
packages_apps_Browser-5fd09fadb9a1544d5e091ca7150ac3a2c0b877cd.tar.bz2
Update Browser to use TEXT_AUTOSIZING
Also enable Web Debugging conditionally based on the platform OS level (to document the best-practice, as much as anything else) Change-Id: Ib89c6e6250370c520ad0c571e6e5a166369f1f40
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r--src/com/android/browser/BrowserSettings.java22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index ed44394..cafd019 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -357,18 +357,17 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
public LayoutAlgorithm getLayoutAlgorithm() {
LayoutAlgorithm layoutAlgorithm = LayoutAlgorithm.NORMAL;
+ final LayoutAlgorithm autosize = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT ?
+ LayoutAlgorithm.TEXT_AUTOSIZING : LayoutAlgorithm.NARROW_COLUMNS;
+
if (autofitPages()) {
- layoutAlgorithm = LayoutAlgorithm.NARROW_COLUMNS;
+ layoutAlgorithm = autosize;
}
if (isDebugEnabled()) {
- if (isSmallScreen()) {
- layoutAlgorithm = LayoutAlgorithm.SINGLE_COLUMN;
+ if (isNormalLayout()) {
+ layoutAlgorithm = LayoutAlgorithm.NORMAL;
} else {
- if (isNormalLayout()) {
- layoutAlgorithm = LayoutAlgorithm.NORMAL;
- } else {
- layoutAlgorithm = LayoutAlgorithm.NARROW_COLUMNS;
- }
+ layoutAlgorithm = autosize;
}
}
return layoutAlgorithm;
@@ -724,13 +723,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return mPrefs.getBoolean(PREF_JAVASCRIPT_CONSOLE, true);
}
- public boolean isSmallScreen() {
- if (!isDebugEnabled()) {
- return false;
- }
- return mPrefs.getBoolean(PREF_SMALL_SCREEN, false);
- }
-
public boolean isWideViewport() {
if (!isDebugEnabled()) {
return true;