diff options
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 22 |
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; |