Skip to content

Commit

Permalink
use NARROW_COLUMNS when using classic webview
Browse files Browse the repository at this point in the history
This reverts commit a31cfea
when using classic webview.

Change-Id: I26741a7b956b384258f0cd8aa444c7ba86fd5390
  • Loading branch information
KonstaT committed May 14, 2014
1 parent 03b1039 commit 8c9ccb1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/com/android/browser/BrowserSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Message;
import android.os.SystemProperties;
import android.preference.PreferenceManager;
import android.provider.Browser;
import android.provider.Settings;
Expand Down Expand Up @@ -356,9 +357,14 @@ public static String getFactoryResetHomeUrl(Context context) {
}

public LayoutAlgorithm getLayoutAlgorithm() {
boolean useClassicWebview = "classic".equals(SystemProperties.get("persist.webview.provider"));
LayoutAlgorithm layoutAlgorithm = LayoutAlgorithm.NORMAL;
if (autofitPages()) {
layoutAlgorithm = LayoutAlgorithm.TEXT_AUTOSIZING;
if (useClassicWebview) {
layoutAlgorithm = LayoutAlgorithm.NARROW_COLUMNS;
} else {
layoutAlgorithm = LayoutAlgorithm.TEXT_AUTOSIZING;
}
}
if (isDebugEnabled()) {
if (isSmallScreen()) {
Expand All @@ -367,7 +373,11 @@ public LayoutAlgorithm getLayoutAlgorithm() {
if (isNormalLayout()) {
layoutAlgorithm = LayoutAlgorithm.NORMAL;
} else {
layoutAlgorithm = LayoutAlgorithm.TEXT_AUTOSIZING;
if (useClassicWebview) {
layoutAlgorithm = LayoutAlgorithm.NARROW_COLUMNS;
} else {
layoutAlgorithm = LayoutAlgorithm.TEXT_AUTOSIZING;
}
}
}
}
Expand Down

0 comments on commit 8c9ccb1

Please sign in to comment.