From 39f5587f30e4ec58bcc39a8f7bca2cef076a7063 Mon Sep 17 00:00:00 2001 From: Bernhard Redl Date: Tue, 17 Apr 2012 00:04:44 +0200 Subject: [PATCH] Fixed Issue 4222. Use of the wrong method to get device-SDK version resulting in errors on ApiLevel 7 (2.1) devices. --- src/com/fsck/k9/view/MessageWebView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/fsck/k9/view/MessageWebView.java b/src/com/fsck/k9/view/MessageWebView.java index 6ec7f50bb..e81016df4 100644 --- a/src/com/fsck/k9/view/MessageWebView.java +++ b/src/com/fsck/k9/view/MessageWebView.java @@ -98,7 +98,13 @@ public class MessageWebView extends WebView { webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); } - if (Integer.parseInt(Build.VERSION.SDK) >= 9 ) { + /* + * Build.VERSION.SDK is deprecated cause it just returns the + * "its raw String representation" + * http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#GINGERBREAD + * http://developer.android.com/reference/android/os/Build.VERSION.html#SDK + */ + if (Build.VERSION.SDK_INT >= 9) { setOverScrollMode(OVER_SCROLL_NEVER); }