Use a more backward compatible os version check, since the "current"

best practice is incompatible with 1.5
This commit is contained in:
Jesse Vincent 2010-10-29 22:36:39 +00:00
parent ff4927a091
commit ccafc36b31
2 changed files with 2 additions and 2 deletions

View File

@ -889,7 +889,7 @@ public class MessageView extends K9Activity implements OnClickListener
// SINGLE_COLUMN layout was broken on Android < 2.2, so we
// administratively disable it
if (
( Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO)
( Integer.parseInt(Build.VERSION.SDK) > Build.VERSION_CODES.ECLAIR)
&& K9.mobileOptimizedLayout())
{
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);

View File

@ -228,7 +228,7 @@ public class Prefs extends K9PreferenceActivity
mZoomControlsEnabled.setChecked(K9.zoomControlsEnabled());
mMobileOptimizedLayout = (CheckBoxPreference) findPreference(PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT);
if ( Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO)
if (Integer.parseInt(Build.VERSION.SDK) <= Build.VERSION_CODES.ECLAIR)
{
mMobileOptimizedLayout.setEnabled(false);
}