1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Fixed lots of warnings (unused imports/variables, missing annotations, etc.)

This commit is contained in:
cketti 2011-01-18 23:54:49 +00:00
parent a40ec8fa98
commit 8279092070
22 changed files with 16 additions and 43 deletions

View File

@ -599,7 +599,7 @@ public class K9 extends Application
try
{
Class strictMode = Class.forName("android.os.StrictMode");
Class<?> strictMode = Class.forName("android.os.StrictMode");
Method enableDefaults = strictMode.getMethod("enableDefaults");
enableDefaults.invoke(strictMode);
}

View File

@ -3,7 +3,6 @@ package com.fsck.k9;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import android.content.Context;
import android.content.SharedPreferences;

View File

@ -77,7 +77,6 @@ public class FolderListFilter<T> extends Filter
final int wordCount = words.length;
final ArrayList<T> values = mOriginalValues;
final int count = values.size();
final ArrayList<T> newValues = new ArrayList<T>();

View File

@ -2934,8 +2934,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
*/
private InsertableHtmlContent quoteOriginalHtmlMessage(final Message originalMessage, final String messageBody, final QuoteStyle quoteStyle) throws MessagingException
{
String body = messageBody == null ? "" : messageBody;
InsertableHtmlContent insertable = findInsertionPoints(messageBody);
if (quoteStyle == QuoteStyle.PREFIX)

View File

@ -1,8 +1,7 @@
package com.fsck.k9.activity;
import com.fsck.k9.helper.MessageHelper;
import java.util.Date;
import com.fsck.k9.mail.Message;
import java.util.Date;
import com.fsck.k9.helper.MessageHelper;
import com.fsck.k9.mail.store.LocalStore.LocalMessage;
public class MessageInfoHolder

View File

@ -11,7 +11,6 @@ import android.content.res.Configuration;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.util.Config;
import android.util.Log;
@ -83,7 +82,6 @@ public class MessageView extends K9Activity implements OnClickListener
private Menu optionsMenu = null;
private Listener mListener = new Listener();
private MessageViewHandler mHandler = new MessageViewHandler();
private FontSizes mFontSizes = K9.getFontSizes();
private Contacts mContacts;
private StorageManager.StorageListener mStorageListener = new StorageListenerImplementation();

View File

@ -32,10 +32,8 @@ import com.fsck.k9.crypto.Apg;
import com.fsck.k9.mail.Store;
import com.fsck.k9.service.MailService;
import com.fsck.k9.mail.store.LocalStore;
import com.fsck.k9.mail.store.StorageManager;
import com.fsck.k9.mail.store.LocalStore.LocalFolder;
import com.fsck.k9.mail.store.StorageManager.StorageProvider;
public class AccountSettings extends K9PreferenceActivity
@ -966,6 +964,8 @@ public class AccountSettings extends K9PreferenceActivity
List<? extends Folder> folders = new LinkedList<LocalFolder>();
String[] allFolderValues;
String[] allFolderLabels;
@Override
protected Void doInBackground(Void... params)
{
try
@ -997,7 +997,7 @@ public class AccountSettings extends K9PreferenceActivity
return null;
}
@Override
protected void onPreExecute()
{
mAutoExpandFolder = (ListPreference)findPreference(PREFERENCE_AUTO_EXPAND_FOLDER);
@ -1016,6 +1016,8 @@ public class AccountSettings extends K9PreferenceActivity
mTrashFolder.setEnabled(false);
}
@Override
protected void onPostExecute(Void res)
{
initListPreference(mAutoExpandFolder, mAccount.getAutoExpandFolderName(), allFolderLabels,allFolderValues);
@ -1032,10 +1034,6 @@ public class AccountSettings extends K9PreferenceActivity
mSentFolder.setEnabled(true);
mSpamFolder.setEnabled(true);
mTrashFolder.setEnabled(true);
}
}
}

View File

@ -274,6 +274,7 @@ public class AccountSetupBasics extends K9Activity
}
}
@Override
protected void onNext()
{
String email = mEmailView.getText().toString();

View File

@ -13,17 +13,14 @@ import android.view.View.OnClickListener;
import android.widget.*;
import com.fsck.k9.*;
import com.fsck.k9.activity.ChooseFolder;
import com.fsck.k9.activity.K9Activity;
import com.fsck.k9.helper.Utility;
import com.fsck.k9.mail.store.StorageManager;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Map;
public class AccountSetupIncoming extends K9Activity implements OnClickListener
{
@ -462,6 +459,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
}
}
@Override
protected void onNext()
{
try

View File

@ -330,6 +330,7 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
}
}
@Override
protected void onNext()
{
int securityType = (Integer)((SpinnerOption)mSecurityTypeView.getSelectedItem()).value;

View File

@ -15,7 +15,6 @@ import android.preference.ListPreference;
import android.preference.Preference;
import android.view.KeyEvent;
import android.widget.Toast;
import android.widget.TimePicker;
import com.fsck.k9.K9;
import com.fsck.k9.Preferences;

View File

@ -1546,8 +1546,8 @@ public class MessagingController implements Runnable
final LocalFolder localFolder,
final Folder remoteFolder,
final Account account,
final List unsyncedMessages,
final ArrayList syncFlagMessages,
final List<Message> unsyncedMessages,
final ArrayList<Message> syncFlagMessages,
boolean flagSyncOnly) throws MessagingException
{
if (message.isSet(Flag.DELETED))

View File

@ -9,7 +9,6 @@ import java.io.IOException;
import java.io.StringReader;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;

View File

@ -40,13 +40,10 @@ public class MessageHelper
private DateFormat mDateFormat;
private DateFormat mTimeFormat;
private MessageHelper(final Context context)
{
mContext = context;
mDateFormat = DateFormatter.getDateFormat(mContext);
mTimeFormat = android.text.format.DateFormat.getTimeFormat(mContext);
mTodayDateFormat = android.text.format.DateFormat.getTimeFormat(mContext);
}
@ -58,7 +55,6 @@ public class MessageHelper
{
LocalMessage message = (LocalMessage) m;
target.message = message;
Date date = message.getSentDate();
target.compareDate = message.getSentDate();
if (target.compareDate == null)
{

View File

@ -6,7 +6,6 @@ import com.fsck.k9.K9;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.MessagingException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.apache.james.mime4j.decoder.Base64InputStream;

View File

@ -2,7 +2,6 @@
package com.fsck.k9.mail.internet;
import com.fsck.k9.helper.Utility;
import com.fsck.k9.mail.MessagingException;
import org.apache.james.mime4j.codec.EncoderUtil;
import java.io.BufferedWriter;

View File

@ -501,6 +501,7 @@ public class MimeMessage extends Message
}
}
@Override
public void setCharset(String charset) throws MessagingException
{
if (mBody instanceof Multipart)

View File

@ -1,7 +1,6 @@
package com.fsck.k9.mail.internet;
import android.os.Build.VERSION;
import android.util.Log;
import com.fsck.k9.K9;
import com.fsck.k9.mail.*;

View File

@ -28,7 +28,6 @@ import android.net.Uri;
import android.util.Log;
import com.fsck.k9.Account;
import com.fsck.k9.Account.FolderMode;
import com.fsck.k9.AccountStats;
import com.fsck.k9.K9;
import com.fsck.k9.Preferences;
@ -41,7 +40,6 @@ import com.fsck.k9.mail.BodyPart;
import com.fsck.k9.mail.FetchProfile;
import com.fsck.k9.mail.Flag;
import com.fsck.k9.mail.Folder;
import com.fsck.k9.mail.Folder.FolderClass;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.Message.RecipientType;
import com.fsck.k9.mail.MessagingException;
@ -1295,7 +1293,6 @@ public class LocalStore extends Store implements Serializable
private FolderClass mSyncClass = FolderClass.INHERITED;
private FolderClass mPushClass = FolderClass.SECOND_CLASS;
private boolean mInTopGroup = false;
private String prefId = null;
private String mPushState = null;
private boolean mIntegrate = false;
// mLastUid is used during syncs. It holds the highest UID within the local folder so we

View File

@ -5,7 +5,6 @@ import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;

View File

@ -2,7 +2,6 @@ package com.fsck.k9.view;
import android.content.Context;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.style.StyleSpan;
@ -32,6 +31,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.text.DateFormat;
public class MessageHeader extends LinearLayout
{
private Context mContext;

View File

@ -13,13 +13,6 @@ import com.fsck.k9.R;
import java.lang.reflect.Method;
/**
* Created by IntelliJ IDEA.
* User: jesse
* Date: 12/25/10
* Time: 3:57 PM
* To change this template use File | Settings | File Templates.
*/
public class MessageWebView extends WebView
{
@ -125,6 +118,7 @@ public class MessageWebView extends WebView
* Emulate the shift key being pressed to trigger the text selection mode
* of a WebView.
*/
@Override
public void emulateShiftHeld()
{
try