diff options
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 22 | ||||
-rw-r--r-- | src/com/android/browser/BrowserWebViewFactory.java | 6 |
2 files changed, 11 insertions, 17 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; diff --git a/src/com/android/browser/BrowserWebViewFactory.java b/src/com/android/browser/BrowserWebViewFactory.java index f976b07..1b04a57 100644 --- a/src/com/android/browser/BrowserWebViewFactory.java +++ b/src/com/android/browser/BrowserWebViewFactory.java @@ -66,8 +66,10 @@ public class BrowserWebViewFactory implements WebViewFactory { final BrowserSettings s = BrowserSettings.getInstance(); s.startManagingSettings(w.getSettings()); - // Remote Web Debugging is always enabled - WebView.setWebContentsDebuggingEnabled(true); + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { + // Remote Web Debugging is always enabled, where available. + WebView.setWebContentsDebuggingEnabled(true); + } } } |