diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java index 65f2959d6..6fff601d3 100644 --- a/src/com/fsck/k9/activity/Accounts.java +++ b/src/com/fsck/k9/activity/Accounts.java @@ -70,7 +70,6 @@ import com.fsck.k9.activity.setup.Prefs; import com.fsck.k9.activity.setup.WelcomeMessage; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.helper.SizeFormatter; -import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mail.Store; import com.fsck.k9.mail.Transport; @@ -100,11 +99,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { */ private static final BaseAccount[] EMPTY_BASE_ACCOUNT_ARRAY = new BaseAccount[0]; - /** - * Immutable empty {@link Flag} array - */ - private static final Flag[] EMPTY_FLAG_ARRAY = new Flag[0]; - /** * URL used to open Android Market application */ @@ -1832,18 +1826,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { public LinearLayout accountsItemLayout; } } - private Flag[] combine(Flag[] set1, Flag[] set2) { - if (set1 == null) { - return set2; - } - if (set2 == null) { - return set1; - } - Set flags = new HashSet(); - flags.addAll(Arrays.asList(set1)); - flags.addAll(Arrays.asList(set2)); - return flags.toArray(EMPTY_FLAG_ARRAY); - } private class AccountClickListener implements OnClickListener { diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index 9f06f7fdc..ff50eef14 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -7,12 +7,9 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import android.app.AlertDialog; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.content.SharedPreferences.Editor; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; @@ -25,8 +22,6 @@ import android.preference.Preference.OnPreferenceChangeListener; import android.preference.PreferenceScreen; import android.preference.RingtonePreference; import android.util.Log; -import android.view.View; -import android.widget.CheckBox; import com.fsck.k9.Account; import com.fsck.k9.Account.FolderMode; diff --git a/src/com/fsck/k9/activity/setup/AccountSetupBasics.java b/src/com/fsck/k9/activity/setup/AccountSetupBasics.java index acafbf8fe..058d505ce 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -14,7 +14,6 @@ import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; -import android.widget.CheckBox; import android.widget.EditText; import com.fsck.k9.*; import com.fsck.k9.activity.K9Activity; @@ -39,7 +38,6 @@ public class AccountSetupBasics extends K9Activity private final static String STATE_KEY_PROVIDER = "com.fsck.k9.AccountSetupBasics.provider"; - private Preferences mPrefs; private EditText mEmailView; private EditText mPasswordView; private Button mNextButton; @@ -58,7 +56,6 @@ public class AccountSetupBasics extends K9Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.account_setup_basics); - mPrefs = Preferences.getPreferences(this); mEmailView = (EditText)findViewById(R.id.account_email); mPasswordView = (EditText)findViewById(R.id.account_password); mNextButton = (Button)findViewById(R.id.next); diff --git a/src/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java b/src/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java index 674806356..a92461e26 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java @@ -3,9 +3,6 @@ package com.fsck.k9.activity.setup; import android.app.Activity; import android.app.AlertDialog; -import android.app.Application; -import android.app.NotificationManager; -import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 1344f2cdd..28e51b040 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -2,8 +2,6 @@ package com.fsck.k9.controller; import java.io.CharArrayWriter; import java.io.PrintWriter; -import java.security.cert.CertPathValidatorException; -import java.security.cert.CertificateException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -721,7 +719,8 @@ public class MessagingController implements Runnable { - public Future searchRemoteMessages(final String acctUuid, final String folderName, final String query, final Flag[] requiredFlags, final Flag[] forbiddenFlags, final MessagingListener listener) { + public Future searchRemoteMessages(final String acctUuid, final String folderName, final String query, + final Flag[] requiredFlags, final Flag[] forbiddenFlags, final MessagingListener listener) { if (K9.DEBUG) { String msg = "searchRemoteMessages (" + "acct=" + acctUuid @@ -5388,6 +5387,8 @@ public class MessagingController implements Runnable { case FINISHED: other.setPushActive(memory.account, memory.folderName, false); break; + case FAILED: + break; } } if (memory.processingState != null) { diff --git a/src/com/fsck/k9/mail/filter/Base64.java b/src/com/fsck/k9/mail/filter/Base64.java index fc8bd4682..ffc7abf94 100644 --- a/src/com/fsck/k9/mail/filter/Base64.java +++ b/src/com/fsck/k9/mail/filter/Base64.java @@ -756,12 +756,16 @@ public class Base64 { } static class DecoderException extends Exception { + private static final long serialVersionUID = -3786485780312120437L; + DecoderException(String error) { super(error); } } static class EncoderException extends Exception { + private static final long serialVersionUID = -5204809025392124652L; + EncoderException(String error) { super(error); } diff --git a/src/com/fsck/k9/mail/internet/MimeMessage.java b/src/com/fsck/k9/mail/internet/MimeMessage.java index e899afbf6..2777420de 100644 --- a/src/com/fsck/k9/mail/internet/MimeMessage.java +++ b/src/com/fsck/k9/mail/internet/MimeMessage.java @@ -23,10 +23,6 @@ import org.apache.james.mime4j.stream.BodyDescriptor; import org.apache.james.mime4j.stream.Field; import org.apache.james.mime4j.stream.MimeConfig; -import android.util.Log; - -import com.fsck.k9.K9; -import com.fsck.k9.helper.HtmlConverter; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.BodyPart; diff --git a/src/com/fsck/k9/mail/internet/TextBody.java b/src/com/fsck/k9/mail/internet/TextBody.java index f89b8aad2..4e9dae3fe 100644 --- a/src/com/fsck/k9/mail/internet/TextBody.java +++ b/src/com/fsck/k9/mail/internet/TextBody.java @@ -37,6 +37,7 @@ public class TextBody implements Body { QuotedPrintableOutputStream qp = new QuotedPrintableOutputStream(out, false); qp.write(bytes); qp.flush(); + qp.close(); } } } diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index ff696828b..72fa4811f 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -77,7 +77,6 @@ import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.FetchProfile; import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Folder.OpenMode; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Part; @@ -962,7 +961,7 @@ public class ImapStore extends Store { */ private void parseFlags(ImapList flags) { for (Object flag : flags) { - flag = flag.toString().toLowerCase(); + flag = flag.toString().toLowerCase(Locale.US); if (flag.equals("\\deleted")) { mPermanentFlagsIndex.add(Flag.DELETED); } else if (flag.equals("\\answered")) { @@ -1601,7 +1600,8 @@ public class ImapStore extends Store { String fetch; String partId = parts[0]; if ("TEXT".equalsIgnoreCase(partId)) { - fetch = String.format("BODY.PEEK[TEXT]<0.%d>", mAccount.getMaximumAutoDownloadMessageSize()); + fetch = String.format(Locale.US, "BODY.PEEK[TEXT]<0.%d>", + mAccount.getMaximumAutoDownloadMessageSize()); } else { fetch = String.format("BODY.PEEK[%s]", partId); } @@ -2277,6 +2277,9 @@ public class ImapStore extends Store { case RECENT: imapQuery += "RECENT "; break; + + default: + break; } } } @@ -2306,6 +2309,9 @@ public class ImapStore extends Store { case RECENT: imapQuery += "UNRECENT "; break; + + default: + break; } } } diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index 91d115aec..69ca2aa84 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -2322,46 +2322,6 @@ public class LocalStore extends Store implements Serializable { } } - /** - * Get the (database) ID of the message with the specified message ID. - * - * @param db - * A {@link SQLiteDatabase} instance to access the database. - * @param messageId - * The message ID to search for. - * @param onlyEmptyMessages - * {@code true} if only "empty messages" (placeholders for threading) should be - * searched - * - * @return If exactly one message with the specified message ID was found, the database ID - * of this message; {@code -1} otherwise. - */ - private long getDatabaseIdByMessageId(SQLiteDatabase db, String messageId, - boolean onlyEmptyMessages) { - long id = -1; - - Cursor cursor = db.query("messages", - new String[] { "id" }, - (onlyEmptyMessages) ? - "empty=1 AND folder_id=? AND message_id=?" : - "folder_id=? AND message_id=?", - new String[] { Long.toString(mFolderId), messageId }, - null, null, null); - - if (cursor != null) { - try { - if (cursor.getCount() == 1) { - cursor.moveToFirst(); - id = cursor.getLong(0); - } - } finally { - cursor.close(); - } - } - - return id; - } - private ThreadInfo getThreadInfo(SQLiteDatabase db, String messageId) { String sql = "SELECT t.id, t.message_id, t.root, t.parent " + "FROM messages m " + diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index ec7c56961..b0abfe46f 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -19,7 +19,6 @@ import java.net.*; import java.security.GeneralSecurityException; import java.security.SecureRandom; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; import java.util.LinkedList; import java.util.HashMap; @@ -59,8 +58,6 @@ public class Pop3Store extends Store { private static final String USER_CAPABILITY = "USER"; private static final String TOP_CAPABILITY = "TOP"; - private static final Flag[] PERMANENT_FLAGS = { Flag.DELETED }; - /** * Decodes a Pop3Store URI. * @@ -1155,6 +1152,8 @@ public class Pop3Store extends Store { * Exception that is thrown if the server returns an error response. */ static class Pop3ErrorResponse extends MessagingException { + private static final long serialVersionUID = 3672087845857867174L; + public Pop3ErrorResponse(String message) { super(message, true); } diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index 770e61e38..56ceb06ea 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -1945,7 +1945,7 @@ public class WebDavStore extends Store { if (!messageURL.endsWith("/")) { messageURL += "/"; } - messageURL += URLEncoder.encode(message.getUid() + ":" + System.currentTimeMillis() + ".eml"); + messageURL += URLEncoder.encode(message.getUid() + ":" + System.currentTimeMillis() + ".eml", "UTF-8"); Log.i(K9.LOG_TAG, "Uploading message as " + messageURL); diff --git a/src/com/fsck/k9/preferences/AccountSettings.java b/src/com/fsck/k9/preferences/AccountSettings.java index 3a6c2be6e..cbb2fa7c1 100644 --- a/src/com/fsck/k9/preferences/AccountSettings.java +++ b/src/com/fsck/k9/preferences/AccountSettings.java @@ -76,16 +76,16 @@ public class AccountSettings { R.array.account_setup_expunge_policy_values)) )); s.put("folderDisplayMode", Settings.versions( - new V(1, new EnumSetting(FolderMode.class, FolderMode.NOT_SECOND_CLASS)) + new V(1, new EnumSetting(FolderMode.class, FolderMode.NOT_SECOND_CLASS)) )); s.put("folderPushMode", Settings.versions( - new V(1, new EnumSetting(FolderMode.class, FolderMode.FIRST_CLASS)) + new V(1, new EnumSetting(FolderMode.class, FolderMode.FIRST_CLASS)) )); s.put("folderSyncMode", Settings.versions( - new V(1, new EnumSetting(FolderMode.class, FolderMode.FIRST_CLASS)) + new V(1, new EnumSetting(FolderMode.class, FolderMode.FIRST_CLASS)) )); s.put("folderTargetMode", Settings.versions( - new V(1, new EnumSetting(FolderMode.class, FolderMode.NOT_SECOND_CLASS)) + new V(1, new EnumSetting(FolderMode.class, FolderMode.NOT_SECOND_CLASS)) )); s.put("goToUnreadMessageSearch", Settings.versions( new V(1, new BooleanSetting(false)) @@ -120,8 +120,8 @@ public class AccountSettings { R.array.account_settings_message_age_values)) )); s.put("messageFormat", Settings.versions( - new V(1, new EnumSetting(Account.MessageFormat.class, - Account.DEFAULT_MESSAGE_FORMAT)) + new V(1, new EnumSetting( + Account.MessageFormat.class, Account.DEFAULT_MESSAGE_FORMAT)) )); s.put("messageFormatAuto", Settings.versions( new V(2, new BooleanSetting(Account.DEFAULT_MESSAGE_FORMAT_AUTO)) @@ -148,7 +148,8 @@ public class AccountSettings { new V(1, new StringSetting(Account.DEFAULT_QUOTE_PREFIX)) )); s.put("quoteStyle", Settings.versions( - new V(1, new EnumSetting(Account.QuoteStyle.class, Account.DEFAULT_QUOTE_STYLE)) + new V(1, new EnumSetting( + Account.QuoteStyle.class, Account.DEFAULT_QUOTE_STYLE)) )); s.put("replyAfterQuote", Settings.versions( new V(1, new BooleanSetting(Account.DEFAULT_REPLY_AFTER_QUOTE)) @@ -160,19 +161,21 @@ public class AccountSettings { new V(1, new RingtoneSetting("content://settings/system/notification_sound")) )); s.put("searchableFolders", Settings.versions( - new V(1, new EnumSetting(Account.Searchable.class, Account.Searchable.ALL)) + new V(1, new EnumSetting( + Account.Searchable.class, Account.Searchable.ALL)) )); s.put("sentFolderName", Settings.versions( new V(1, new StringSetting("Sent")) )); s.put("sortTypeEnum", Settings.versions( - new V(9, new EnumSetting(SortType.class, Account.DEFAULT_SORT_TYPE)) + new V(9, new EnumSetting(SortType.class, Account.DEFAULT_SORT_TYPE)) )); s.put("sortAscending", Settings.versions( new V(9, new BooleanSetting(Account.DEFAULT_SORT_ASCENDING)) )); s.put("showPicturesEnum", Settings.versions( - new V(1, new EnumSetting(Account.ShowPictures.class, Account.ShowPictures.NEVER)) + new V(1, new EnumSetting( + Account.ShowPictures.class, Account.ShowPictures.NEVER)) )); s.put("signatureBeforeQuotedText", Settings.versions( new V(1, new BooleanSetting(false)) diff --git a/src/com/fsck/k9/preferences/FolderSettings.java b/src/com/fsck/k9/preferences/FolderSettings.java index f9bd231c5..aae048092 100644 --- a/src/com/fsck/k9/preferences/FolderSettings.java +++ b/src/com/fsck/k9/preferences/FolderSettings.java @@ -26,13 +26,13 @@ public class FolderSettings { */ s.put("displayMode", Settings.versions( - new V(1, new EnumSetting(FolderClass.class, FolderClass.NO_CLASS)) + new V(1, new EnumSetting(FolderClass.class, FolderClass.NO_CLASS)) )); s.put("syncMode", Settings.versions( - new V(1, new EnumSetting(FolderClass.class, FolderClass.INHERITED)) + new V(1, new EnumSetting(FolderClass.class, FolderClass.INHERITED)) )); s.put("pushMode", Settings.versions( - new V(1, new EnumSetting(FolderClass.class, FolderClass.INHERITED)) + new V(1, new EnumSetting(FolderClass.class, FolderClass.INHERITED)) )); s.put("inTopGroup", Settings.versions( new V(1, new BooleanSetting(false)) diff --git a/src/com/fsck/k9/preferences/GlobalSettings.java b/src/com/fsck/k9/preferences/GlobalSettings.java index 91f174a4a..2d663a47f 100644 --- a/src/com/fsck/k9/preferences/GlobalSettings.java +++ b/src/com/fsck/k9/preferences/GlobalSettings.java @@ -44,7 +44,8 @@ public class GlobalSettings { new V(1, new DirectorySetting(Environment.getExternalStorageDirectory().toString())) )); s.put("backgroundOperations", Settings.versions( - new V(1, new EnumSetting(K9.BACKGROUND_OPS.class, K9.BACKGROUND_OPS.WHEN_CHECKED)) + new V(1, new EnumSetting( + K9.BACKGROUND_OPS.class, K9.BACKGROUND_OPS.WHEN_CHECKED)) )); s.put("changeRegisteredNameColor", Settings.versions( new V(1, new BooleanSetting(false)) @@ -175,7 +176,7 @@ public class GlobalSettings { new V(1, new BooleanSetting(true)) )); s.put("sortTypeEnum", Settings.versions( - new V(10, new EnumSetting(SortType.class, Account.DEFAULT_SORT_TYPE)) + new V(10, new EnumSetting(SortType.class, Account.DEFAULT_SORT_TYPE)) )); s.put("sortAscending", Settings.versions( new V(10, new BooleanSetting(Account.DEFAULT_SORT_ASCENDING)) @@ -220,8 +221,8 @@ public class GlobalSettings { new V(8, new BooleanSetting(true)) )); s.put("notificationHideSubject", Settings.versions( - new V(12, new EnumSetting(NotificationHideSubject.class, - NotificationHideSubject.NEVER)) + new V(12, new EnumSetting( + NotificationHideSubject.class, NotificationHideSubject.NEVER)) )); s.put("useBackgroundAsUnreadIndicator", Settings.versions( new V(19, new BooleanSetting(true)) @@ -230,7 +231,7 @@ public class GlobalSettings { new V(20, new BooleanSetting(true)) )); s.put("splitViewMode", Settings.versions( - new V(23, new EnumSetting(SplitViewMode.class, SplitViewMode.NEVER)) + new V(23, new EnumSetting(SplitViewMode.class, SplitViewMode.NEVER)) )); SETTINGS = Collections.unmodifiableMap(s); diff --git a/src/com/fsck/k9/preferences/Settings.java b/src/com/fsck/k9/preferences/Settings.java index a5e2cfb04..5ed29b360 100644 --- a/src/com/fsck/k9/preferences/Settings.java +++ b/src/com/fsck/k9/preferences/Settings.java @@ -457,19 +457,18 @@ public class Settings { * {@link Enum#toString()} is used to obtain the "pretty" string representation. *

*/ - public static class EnumSetting extends SettingsDescription { - private Class> mEnumClass; + public static class EnumSetting> extends SettingsDescription { + private Class mEnumClass; - public EnumSetting(Class> enumClass, Object defaultValue) { + public EnumSetting(Class enumClass, Object defaultValue) { super(defaultValue); mEnumClass = enumClass; } - @SuppressWarnings("unchecked") @Override public Object fromString(String value) throws InvalidSettingValueException { try { - return Enum.valueOf((Class)mEnumClass, value); + return Enum.valueOf(mEnumClass, value); } catch (Exception e) { throw new InvalidSettingValueException(); } diff --git a/src/com/fsck/k9/preferences/SettingsImportExportException.java b/src/com/fsck/k9/preferences/SettingsImportExportException.java index 616a466bf..b2a6a5b7d 100644 --- a/src/com/fsck/k9/preferences/SettingsImportExportException.java +++ b/src/com/fsck/k9/preferences/SettingsImportExportException.java @@ -1,6 +1,7 @@ package com.fsck.k9.preferences; public class SettingsImportExportException extends Exception { + private static final long serialVersionUID = -6042736634079588513L; public SettingsImportExportException() { super(); diff --git a/src/com/fsck/k9/provider/EmailProvider.java b/src/com/fsck/k9/provider/EmailProvider.java index 0186a075f..7064ad2f4 100644 --- a/src/com/fsck/k9/provider/EmailProvider.java +++ b/src/com/fsck/k9/provider/EmailProvider.java @@ -124,13 +124,6 @@ public class EmailProvider extends ContentProvider { private static final String THREADS_TABLE = "threads"; - private static final String[] THREADS_COLUMNS = { - ThreadColumns.ID, - ThreadColumns.MESSAGE_ID, - ThreadColumns.ROOT, - ThreadColumns.PARENT - }; - static { UriMatcher matcher = sUriMatcher; diff --git a/src/com/fsck/k9/search/LocalSearch.java b/src/com/fsck/k9/search/LocalSearch.java index c2c96528e..9ee9577e9 100644 --- a/src/com/fsck/k9/search/LocalSearch.java +++ b/src/com/fsck/k9/search/LocalSearch.java @@ -8,8 +8,6 @@ import java.util.Set; import android.os.Parcel; import android.os.Parcelable; -import com.fsck.k9.mail.Flag; - /** * This class represents a local search. * diff --git a/src/com/fsck/k9/service/NotificationActionService.java b/src/com/fsck/k9/service/NotificationActionService.java index 698ff53b2..036e6e8c4 100644 --- a/src/com/fsck/k9/service/NotificationActionService.java +++ b/src/com/fsck/k9/service/NotificationActionService.java @@ -9,9 +9,7 @@ import com.fsck.k9.activity.MessageCompose; import com.fsck.k9.activity.MessageReference; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.mail.Flag; -import com.fsck.k9.mail.Folder; import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessagingException; import android.app.PendingIntent; import android.content.Context; diff --git a/src/com/fsck/k9/view/MessageHeader.java b/src/com/fsck/k9/view/MessageHeader.java index e63152b69..05162710d 100644 --- a/src/com/fsck/k9/view/MessageHeader.java +++ b/src/com/fsck/k9/view/MessageHeader.java @@ -386,7 +386,6 @@ public class MessageHeader extends ScrollView implements OnClickListener { static class SavedState extends BaseSavedState { boolean additionalHeadersVisible; - @SuppressWarnings("hiding") public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { @Override diff --git a/src/com/fsck/k9/view/MessageWebView.java b/src/com/fsck/k9/view/MessageWebView.java index 1e82554ec..38b787534 100644 --- a/src/com/fsck/k9/view/MessageWebView.java +++ b/src/com/fsck/k9/view/MessageWebView.java @@ -173,7 +173,7 @@ public class MessageWebView extends TitleBarWebView { KeyEvent shiftPressEvent = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SHIFT_LEFT, 0, 0); - shiftPressEvent.dispatch(this); + shiftPressEvent.dispatch(this, null, null); Toast.makeText(getContext() , R.string.select_text_now, Toast.LENGTH_SHORT).show(); } catch (Exception e) { Log.e(K9.LOG_TAG, "Exception in emulateShiftHeld()", e); diff --git a/src/com/fsck/k9/view/SingleMessageView.java b/src/com/fsck/k9/view/SingleMessageView.java index 2344782cf..5f0f208c8 100644 --- a/src/com/fsck/k9/view/SingleMessageView.java +++ b/src/com/fsck/k9/view/SingleMessageView.java @@ -800,7 +800,6 @@ public class SingleMessageView extends LinearLayout implements OnClickListener, boolean hiddenAttachmentsVisible; boolean showPictures; - @SuppressWarnings("hiding") public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { @Override