mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-12 04:25:08 -05:00
SINGLE_COLUMN layouts cause Android 1.0-2.1 to segfault.
This commit is contained in:
parent
b749a198a7
commit
e0d6a55d06
@ -32,6 +32,7 @@ import android.graphics.drawable.Drawable;
|
||||
import android.media.MediaScannerConnection;
|
||||
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
@ -886,7 +887,12 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
{
|
||||
webSettings.setBuiltInZoomControls(true);
|
||||
}
|
||||
if (K9.mobileOptimizedLayout())
|
||||
|
||||
// SINGLE_COLUMN layout was broken on Android < 2.2, so we
|
||||
// administratively disable it
|
||||
if (
|
||||
( Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO)
|
||||
&& K9.mobileOptimizedLayout())
|
||||
{
|
||||
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.ListPreference;
|
||||
@ -227,6 +228,12 @@ 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)
|
||||
{
|
||||
mMobileOptimizedLayout.setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
mMobileOptimizedLayout.setChecked(K9.mobileOptimizedLayout());
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user