1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Code cleanup. Fixed lots of warnings reported by Eclipse.

- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
This commit is contained in:
cketti 2010-04-16 12:20:10 +00:00
parent 90f4bc5ade
commit 57cc4cd735
42 changed files with 281 additions and 169 deletions

View File

@ -5,8 +5,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.util.Log;
import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Folder;
import com.fsck.k9.mail.MessagingException;
@ -15,7 +13,6 @@ import com.fsck.k9.mail.store.LocalStore;
import com.fsck.k9.mail.store.LocalStore.LocalFolder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

View File

@ -69,6 +69,7 @@ public class FixedLengthInputStream extends InputStream
return read(b, 0, b.length);
}
@Override
public String toString()
{
return String.format("FixedLengthInputStream(in=%s, length=%d)", mIn.toString(), mLength);

View File

@ -282,9 +282,9 @@ public class K9 extends Application
*/
MailService.actionReset(context, wakeLockId);
}
Class[] classes = { MessageCompose.class, BootReceiver.class, MailService.class };
Class<?>[] classes = { MessageCompose.class, BootReceiver.class, MailService.class };
for (Class clazz : classes)
for (Class<?> clazz : classes)
{
boolean alreadyEnabled = pm.getComponentEnabledSetting(new ComponentName(context, clazz)) ==
@ -501,7 +501,7 @@ public class K9 extends Application
}
private static Method getMethod(Class classObject, String methodName)
private static Method getMethod(Class<?> classObject, String methodName)
{
try
{

View File

@ -5,6 +5,7 @@ import android.app.Activity;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.widget.ScrollView;
@ -85,12 +86,12 @@ public class K9Activity extends Activity
int height = getResources().getDisplayMetrics().heightPixels;
if (ev.getRawY() < (height/4))
{
mTopView.fullScroll(mTopView.FOCUS_UP);
mTopView.fullScroll(View.FOCUS_UP);
}
else if (ev.getRawY() > (height - height/4))
{
mTopView.fullScroll(mTopView.FOCUS_DOWN);
mTopView.fullScroll(View.FOCUS_DOWN);
}
}

View File

@ -197,15 +197,6 @@ public class MessagingController implements Runnable
deletedUids.put(messKey, "true");
}
private void unsuppressMessage(Account account, String folder, Message message)
{
if (account == null || folder == null || message == null)
{
return;
}
unsuppressMessage(account, folder, message.getUid());
}
private void unsuppressMessage(Account account, String folder, String uid)
{
if (account == null || folder == null || uid == null)
@ -797,7 +788,6 @@ public class MessagingController implements Runnable
}
public void messagesFinished(int number) {}
private void addPendingMessages() {}
};
try
@ -3085,10 +3075,12 @@ public class MessagingController implements Runnable
}
catch (Exception e)
{
/*
for (MessagingListener l : getListeners())
{
// TODO general failed
}
*/
addErrorMessage(account, null, e);
}
@ -4421,7 +4413,7 @@ public class MessagingController implements Runnable
}
static AtomicInteger sequencing = new AtomicInteger(0);
class Command implements Comparable
class Command implements Comparable<Command>
{
public Runnable runnable;
@ -4433,25 +4425,21 @@ public class MessagingController implements Runnable
int sequence = sequencing.getAndIncrement();
public int compareTo(Object arg0)
@Override
public int compareTo(Command other)
{
if (arg0 instanceof Command)
if (other.isForeground == true && isForeground == false)
{
Command other = (Command)arg0;
if (other.isForeground == true && isForeground == false)
{
return 1;
}
else if (other.isForeground == false && isForeground == true)
{
return -1;
}
else
{
return (sequence - other.sequence);
}
return 1;
}
else if (other.isForeground == false && isForeground == true)
{
return -1;
}
else
{
return (sequence - other.sequence);
}
return 0;
}
}
@ -4776,6 +4764,7 @@ public class MessagingController implements Runnable
return memory;
}
@Override
public synchronized void synchronizeMailboxStarted(Account account, String folder)
{
Memory memory = getMemory(account, folder);
@ -4784,6 +4773,7 @@ public class MessagingController implements Runnable
memory.folderTotal = 0;
}
@Override
public synchronized void synchronizeMailboxFinished(Account account, String folder,
int totalMessagesInMailbox, int numNewMessages)
{
@ -4793,6 +4783,7 @@ public class MessagingController implements Runnable
memory.syncingNumNewMessages = numNewMessages;
}
@Override
public synchronized void synchronizeMailboxFailed(Account account, String folder,
String message)
{
@ -4911,6 +4902,7 @@ public class MessagingController implements Runnable
memory.pushingState = (active ? MemorizingState.STARTED : MemorizingState.FINISHED);
}
@Override
public synchronized void sendPendingMessagesStarted(Account account)
{
Memory memory = getMemory(account, null);
@ -4919,12 +4911,14 @@ public class MessagingController implements Runnable
memory.folderTotal = 0;
}
@Override
public synchronized void sendPendingMessagesCompleted(Account account)
{
Memory memory = getMemory(account, null);
memory.sendingState = MemorizingState.FINISHED;
}
@Override
public synchronized void sendPendingMessagesFailed(Account account)
{
Memory memory = getMemory(account, null);
@ -4932,6 +4926,7 @@ public class MessagingController implements Runnable
}
@Override
public synchronized void synchronizeMailboxProgress(Account account, String folderName, int completed, int total)
{
Memory memory = getMemory(account, folderName);
@ -4940,6 +4935,7 @@ public class MessagingController implements Runnable
}
@Override
public synchronized void pendingCommandsProcessing(Account account)
{
Memory memory = getMemory(account, null);
@ -4947,17 +4943,20 @@ public class MessagingController implements Runnable
memory.folderCompleted = 0;
memory.folderTotal = 0;
}
@Override
public synchronized void pendingCommandsFinished(Account account)
{
Memory memory = getMemory(account, null);
memory.processingState = MemorizingState.FINISHED;
}
@Override
public synchronized void pendingCommandStarted(Account account, String commandTitle)
{
Memory memory = getMemory(account, null);
memory.processingCommandTitle = commandTitle;
}
@Override
public synchronized void pendingCommandCompleted(Account account, String commandTitle)
{
Memory memory = getMemory(account, null);

View File

@ -9,7 +9,6 @@ import com.fsck.k9.mail.Folder;
import com.fsck.k9.mail.Folder.OpenMode;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.PushReceiver;
import com.fsck.k9.mail.Store;
import com.fsck.k9.mail.store.LocalStore;
import com.fsck.k9.mail.store.LocalStore.LocalFolder;
import com.fsck.k9.service.SleepService;

View File

@ -73,6 +73,7 @@ public class PeekableInputStream extends InputStream
return read(b, 0, b.length);
}
@Override
public String toString()
{
return String.format("PeekableInputStream(in=%s, peeked=%b, peekedByte=%d)",

View File

@ -189,6 +189,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
mHandler.refreshTitle();
}
@Override
public void synchronizeMailboxProgress(Account account, String folder, int completed, int total)
{
super.synchronizeMailboxProgress(account, folder, completed, total);
@ -227,21 +228,28 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
mHandler.refreshTitle();
}
@Override
public void pendingCommandsProcessing(Account account)
{
super.pendingCommandsProcessing(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandsFinished(Account account)
{
super.pendingCommandsFinished(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandStarted(Account account, String commandTitle)
{
super.pendingCommandStarted(account, commandTitle);
mHandler.refreshTitle();
}
@Override
public void pendingCommandCompleted(Account account, String commandTitle)
{
super.pendingCommandCompleted(account, commandTitle);
@ -480,6 +488,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
return super.onCreateDialog(id);
}
@Override
public void onPrepareDialog(int id, Dialog d)
{
switch (id)
@ -529,6 +538,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
.create();
}
@Override
public boolean onContextItemSelected(MenuItem item)
{
AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo)item.getMenuInfo();
@ -583,7 +593,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
}
public void onItemClick(AdapterView parent, View view, int position, long id)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Account account = (Account)parent.getItemAtPosition(position);
onOpenAccount(account);
@ -781,6 +791,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
public View chip;
}
}
private class SearchAccount extends Account
{
private Flag[] mRequiredFlags = null;
@ -788,36 +799,39 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
private String email = null;
private boolean mIntegrate = false;
private SearchAccount(Context context, boolean integrate, Flag[] requiredFlags, Flag[] forbiddenFlags)
{
super(context);
mRequiredFlags = requiredFlags;
mForbiddenFlags = forbiddenFlags;
mIntegrate = integrate;
}
public String getEmail()
private SearchAccount(Context context, boolean integrate, Flag[] requiredFlags, Flag[] forbiddenFlags)
{
super(context);
mRequiredFlags = requiredFlags;
mForbiddenFlags = forbiddenFlags;
mIntegrate = integrate;
}
@Override
public synchronized String getEmail()
{
return email;
}
public void setEmail(String email)
@Override
public synchronized void setEmail(String email)
{
this.email = email;
}
public Flag[] getRequiredFlags()
{
return mRequiredFlags;
}
public Flag[] getForbiddenFlags()
{
return mForbiddenFlags;
}
public boolean isIntegrate()
{
return mIntegrate;
}
public void setIntegrate(boolean integrate)
{
this.mIntegrate = integrate;
}
}
}

View File

@ -89,6 +89,7 @@ public class ActivityListener extends MessagingListener
mFolderTotal = 0;
}
@Override
public void synchronizeMailboxProgress(Account account, String folder, int completed, int total)
{
mFolderCompleted = completed;
@ -116,27 +117,33 @@ public class ActivityListener extends MessagingListener
mSendingAccountDescription = null;
}
@Override
public void sendPendingMessagesFailed(Account account)
{
mSendingAccountDescription = null;
}
@Override
public void pendingCommandsProcessing(Account account)
{
mProcessingAccountDescription = account.getDescription();
mFolderCompleted = 0;
mFolderTotal = 0;
}
@Override
public void pendingCommandsFinished(Account account)
{
mProcessingAccountDescription = null;
}
@Override
public void pendingCommandStarted(Account account, String commandTitle)
{
mProcessingCommandTitle = commandTitle;
}
@Override
public void pendingCommandCompleted(Account account, String commandTitle)
{
mProcessingCommandTitle = null;
@ -152,5 +159,4 @@ public class ActivityListener extends MessagingListener
return mFolderTotal;
}
}

View File

@ -79,7 +79,7 @@ public class ChooseFolder extends K9ListActivity
this.getListView().setOnItemClickListener(new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView adapterview, View view, int i, long l)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Intent intent = new Intent();
intent.putExtra(EXTRA_CUR_FOLDER, mFolder);
@ -105,6 +105,7 @@ public class ChooseFolder extends K9ListActivity
private static final int MSG_DATA_CHANGED = 3;
private static final int MSG_SET_SELECTED_FOLDER = 4;
@Override
public void handleMessage(android.os.Message msg)
{
switch (msg.what)
@ -147,6 +148,7 @@ public class ChooseFolder extends K9ListActivity
private MessagingListener mListener = new MessagingListener()
{
@Override
public void listFoldersStarted(Account account)
{
if (!account.equals(mAccount))

View File

@ -22,7 +22,6 @@ public class ChooseIdentity extends K9ListActivity
Account mAccount;
String mUID;
ArrayAdapter<String> adapter;
private ChooseIdentityHandler mHandler = new ChooseIdentityHandler();
public static final String EXTRA_ACCOUNT = "com.fsck.k9.ChooseIdentity_account";
public static final String EXTRA_IDENTITY = "com.fsck.k9.ChooseIdentity_identity";
@ -65,7 +64,6 @@ public class ChooseIdentity extends K9ListActivity
identities = mAccount.getIdentities();
for (Identity identity : identities)
{
String email = identity.getEmail();
String description = identity.getDescription();
if (description == null || description.trim().length() == 0)
{
@ -80,15 +78,15 @@ public class ChooseIdentity extends K9ListActivity
{
this.getListView().setOnItemClickListener(new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView adapterview, View view, int i, long l)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Identity identity = mAccount.getIdentity(i);
Identity identity = mAccount.getIdentity(position);
String email = identity.getEmail();
if (email != null && email.trim().equals("") == false)
{
Intent intent = new Intent();
intent.putExtra(EXTRA_IDENTITY, mAccount.getIdentity(i));
intent.putExtra(EXTRA_IDENTITY, mAccount.getIdentity(position));
setResult(RESULT_OK, intent);
finish();
}
@ -108,6 +106,7 @@ public class ChooseIdentity extends K9ListActivity
private static final int MSG_PROGRESS = 2;
private static final int MSG_DATA_CHANGED = 3;
@Override
public void handleMessage(android.os.Message msg)
{
switch (msg.what)

View File

@ -178,6 +178,7 @@ public class FolderList extends K9ListActivity
wakeLock.acquire(K9.WAKE_LOCK_TIMEOUT);
MessagingListener listener = new MessagingListener()
{
@Override
public void synchronizeMailboxFinished(Account account, String folder, int totalMessagesInMailbox, int numNewMessages)
{
if (!account.equals(mAccount))
@ -256,7 +257,7 @@ public class FolderList extends K9ListActivity
mListView.setScrollingCacheEnabled(true);
mListView.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView parent, View v, int itemPosition, long id)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
onOpenFolder(((FolderInfoHolder)mAdapter.getItem(id)).name);
}
@ -270,11 +271,11 @@ public class FolderList extends K9ListActivity
onNewIntent(getIntent());
}
@Override
public void onNewIntent(Intent intent)
{
setIntent(intent); // onNewIntent doesn't autoset our "internal" intent
String savedFolderName = null;
String initialFolder;
mUnreadMessageCount = 0;
@ -619,6 +620,7 @@ public class FolderList extends K9ListActivity
return super.onCreateDialog(id);
}
@Override
public void onPrepareDialog(int id, Dialog dialog)
{
switch (id)
@ -740,11 +742,13 @@ public class FolderList extends K9ListActivity
return mFolders.size();
}
@Override
public boolean isEnabled(int item)
{
return true;
}
@Override
public boolean areAllItemsEnabled()
{
return true;
@ -879,6 +883,7 @@ public class FolderList extends K9ListActivity
}
@Override
public void synchronizeMailboxStarted(Account account, String folder)
{
super.synchronizeMailboxStarted(account, folder);
@ -1079,6 +1084,7 @@ public class FolderList extends K9ListActivity
}
@Override
public void accountSizeChanged(Account account, long oldSize, long newSize)
{
if (!account.equals(mAccount))
@ -1089,21 +1095,29 @@ public class FolderList extends K9ListActivity
mHandler.accountSizeChanged(oldSize, newSize);
}
@Override
public void pendingCommandsProcessing(Account account)
{
super.pendingCommandsProcessing(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandsFinished(Account account)
{
super.pendingCommandsFinished(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandStarted(Account account, String commandTitle)
{
super.pendingCommandStarted(account, commandTitle);
mHandler.refreshTitle();
}
@Override
public void pendingCommandCompleted(Account account, String commandTitle)
{
super.pendingCommandCompleted(account, commandTitle);
@ -1237,6 +1251,7 @@ public class FolderList extends K9ListActivity
return view;
}
@Override
public boolean hasStableIds()
{
return false;
@ -1273,16 +1288,16 @@ public class FolderList extends K9ListActivity
public boolean outbox;
@Override
public boolean equals(Object o)
{
if (this.name.equals(((FolderInfoHolder)o).name))
{
return true;
}
else
{
return false;
}
return this.name.equals(((FolderInfoHolder)o).name);
}
@Override
public int hashCode()
{
return name.hashCode();
}
public int compareTo(FolderInfoHolder o)

View File

@ -17,13 +17,15 @@ public class ManageIdentities extends ChooseIdentity
public static final String EXTRA_IDENTITIES = "com.fsck.k9.EditIdentity_identities";
private static final int ACTIVITY_EDIT_IDENTITY = 1;
@Override
protected void setupClickListeners()
{
this.getListView().setOnItemClickListener(new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView adapterview, View view, int i, long l)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
editItem(i);
editItem(position);
}
});
@ -72,6 +74,7 @@ public class ManageIdentities extends ChooseIdentity
getMenuInflater().inflate(R.menu.manage_identities_context, menu);
}
@Override
public boolean onContextItemSelected(MenuItem item)
{
AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo)item.getMenuInfo();

View File

@ -572,12 +572,14 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mDraftNeedsSaving = false;
}
@Override
public void onResume()
{
super.onResume();
MessagingController.getInstance(getApplication()).addListener(mListener);
}
@Override
public void onPause()
{
super.onPause();
@ -1077,6 +1079,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
@ -1120,6 +1123,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
super.onCreateOptionsMenu(menu);
@ -1289,7 +1293,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
{
for (Address address : message.getRecipients(RecipientType.TO))
{
Identity identity = mAccount.findIdentity(address);
if (!mAccount.isAnIdentity(address))
{
addAddress(mToView, address);

View File

@ -11,10 +11,7 @@ import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.text.SpannableString;
import android.text.Spannable;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.text.style.TextAppearanceSpan;
import android.util.Config;
import android.util.Log;
@ -327,7 +324,7 @@ public class MessageList
}
public void onItemClick(AdapterView parent, View v, int position, long id)
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
if (mCurrentFolder != null && ((position+1) == mAdapter.getCount()))
{
@ -362,6 +359,7 @@ public class MessageList
onNewIntent(getIntent());
}
@Override
public void onNewIntent(Intent intent)
{
setIntent(intent); // onNewIntent doesn't autoset our "internal" intent
@ -588,6 +586,7 @@ public class MessageList
}
}//switch
boolean result;
int position = mListView.getSelectedItemPosition();
try
{
@ -665,8 +664,10 @@ public class MessageList
}
finally
{
return super.onKeyDown(keyCode, event);
result = super.onKeyDown(keyCode, event);
}
return result;
}//onKeyDown
private void onOpenMessage(MessageInfoHolder message)
@ -954,6 +955,7 @@ public class MessageList
return super.onCreateDialog(id);
}
@Override
public void onPrepareDialog(int id, Dialog dialog)
{
switch (id)
@ -1341,11 +1343,11 @@ public class MessageList
bar.setIndeterminate(true);
if (status)
{
bar.setVisibility(bar.VISIBLE);
bar.setVisibility(ProgressBar.VISIBLE);
}
else
{
bar.setVisibility(bar.INVISIBLE);
bar.setVisibility(ProgressBar.INVISIBLE);
}
}
@ -1627,28 +1629,35 @@ public class MessageList
}
}
@Override
public void pendingCommandsProcessing(Account account)
{
super.pendingCommandsProcessing(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandsFinished(Account account)
{
super.pendingCommandsFinished(account);
mHandler.refreshTitle();
}
@Override
public void pendingCommandStarted(Account account, String commandTitle)
{
super.pendingCommandStarted(account, commandTitle);
mHandler.refreshTitle();
}
@Override
public void pendingCommandCompleted(Account account, String commandTitle)
{
super.pendingCommandCompleted(account, commandTitle);
mHandler.refreshTitle();
}
@Override
public void messageUidChanged(Account account, String folder, String oldUid, String newUid)
{
if (updateForMe(account, folder))
@ -2062,6 +2071,7 @@ public class MessageList
return footerView;
}
@Override
public boolean hasStableIds()
{
return true;
@ -2197,16 +2207,16 @@ public class MessageList
}
}
@Override
public boolean equals(Object o)
{
if (this.uid.equals(((MessageInfoHolder)o).uid))
{
return true;
}
else
{
return false;
}
return (this.uid.equals(((MessageInfoHolder)o).uid));
}
@Override
public int hashCode()
{
return uid.hashCode();
}

View File

@ -431,6 +431,7 @@ public class MessageView extends K9Activity
context.startActivity(i);
}
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
@ -684,6 +685,7 @@ public class MessageView extends K9Activity
mPreviousMessageUid = mMessageUids.get(i + 1);
}
@Override
public void onResume()
{
super.onResume();
@ -910,6 +912,7 @@ public class MessageView extends K9Activity
next.requestFocus();
}
@Override
protected void onPrevious(boolean animate)
{
if (mPreviousMessageUid == null)
@ -1065,6 +1068,7 @@ public class MessageView extends K9Activity
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())

View File

@ -259,6 +259,17 @@ public class AccountSetupBasics extends K9Activity
outgoingUri = new URI(outgoingUriTemplate.getScheme(), outgoingUsername + ":"
+ passwordEnc, outgoingUriTemplate.getHost(), outgoingUriTemplate.getPort(), null,
null, null);
mAccount = Preferences.getPreferences(this).newAccount();
mAccount.setName(getOwnerName());
mAccount.setEmail(email);
mAccount.setStoreUri(incomingUri.toString());
mAccount.setTransportUri(outgoingUri.toString());
mAccount.setDraftsFolderName(getString(R.string.special_mailbox_name_drafts));
mAccount.setTrashFolderName(getString(R.string.special_mailbox_name_trash));
mAccount.setOutboxFolderName(getString(R.string.special_mailbox_name_outbox));
mAccount.setSentFolderName(getString(R.string.special_mailbox_name_sent));
AccountSetupCheckSettings.actionCheckSettings(this, mAccount, true, true);
}
catch (UnsupportedEncodingException enc)
{
@ -274,17 +285,6 @@ public class AccountSetupBasics extends K9Activity
onManualSetup();
return;
}
mAccount = Preferences.getPreferences(this).newAccount();
mAccount.setName(getOwnerName());
mAccount.setEmail(email);
mAccount.setStoreUri(incomingUri.toString());
mAccount.setTransportUri(outgoingUri.toString());
mAccount.setDraftsFolderName(getString(R.string.special_mailbox_name_drafts));
mAccount.setTrashFolderName(getString(R.string.special_mailbox_name_trash));
mAccount.setOutboxFolderName(getString(R.string.special_mailbox_name_outbox));
mAccount.setSentFolderName(getString(R.string.special_mailbox_name_sent));
AccountSetupCheckSettings.actionCheckSettings(this, mAccount, true, true);
}
private void onNext()

View File

@ -86,6 +86,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList
new Thread()
{
@Override
public void run()
{
Store store = null;
@ -325,6 +326,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList
});
}
@Override
public void onActivityResult(int reqCode, int resCode, Intent data)
{
setResult(resCode);

View File

@ -166,12 +166,12 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
*/
mSecurityTypeView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
{
public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3)
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
updatePortFromSecurityType();
}
public void onNothingSelected(AdapterView<?> arg0)
public void onNothingSelected(AdapterView<?> parent)
{
}
});

View File

@ -153,12 +153,12 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
*/
mSecurityTypeView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
{
public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3)
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
updatePortFromSecurityType();
}
public void onNothingSelected(AdapterView<?> arg0)
public void onNothingSelected(AdapterView<?> parent)
{
}
});

View File

@ -6,7 +6,6 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.view.KeyEvent;

View File

@ -697,41 +697,6 @@ public class Base64 implements BinaryEncoder, BinaryDecoder
return result;
}
/**
* Discards any whitespace from a base-64 encoded block.
*
* @param data
* The base-64 encoded data to discard the whitespace from.
* @return The data, less whitespace (see RFC 2045).
* @deprecated This method is no longer needed
*/
static byte[] discardWhitespace(byte[] data)
{
byte groomedData[] = new byte[data.length];
int bytesCopied = 0;
for (int i = 0; i < data.length; i++)
{
switch (data[i])
{
case ' ' :
case '\n' :
case '\r' :
case '\t' :
break;
default :
groomedData[bytesCopied++] = data[i];
}
}
byte packedData[] = new byte[bytesCopied];
System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
return packedData;
}
/**
* Check if a byte value is whitespace or not.
*

View File

@ -98,6 +98,7 @@ public class Base64OutputStream extends FilterOutputStream
/**
* Writes the specified <code>byte</code> to this output stream.
*/
@Override
public void write(int i) throws IOException
{
singleByte[0] = (byte) i;
@ -117,6 +118,7 @@ public class Base64OutputStream extends FilterOutputStream
* @throws NullPointerException if the byte array parameter is null
* @throws IndexOutOfBoundsException if offset, len or buffer size are invalid
*/
@Override
public void write(byte b[], int offset, int len) throws IOException
{
if (b == null)
@ -178,6 +180,7 @@ public class Base64OutputStream extends FilterOutputStream
*
* @throws IOException if an I/O error occurs.
*/
@Override
public void flush() throws IOException
{
flush(true);
@ -187,6 +190,7 @@ public class Base64OutputStream extends FilterOutputStream
* Closes this output stream, flushing any remaining bytes that must be encoded. The
* underlying stream is flushed but not closed.
*/
@Override
public void close() throws IOException
{
// Notify encoder of EOF (-1).

View File

@ -151,6 +151,12 @@ public class Address
}
return super.equals(o);
}
@Override
public int hashCode()
{
return getAddress().hashCode();
}
@Override
public String toString()

View File

@ -15,7 +15,7 @@ import java.util.ArrayList;
* any information it needs to download the content.
* </pre>
*/
public class FetchProfile extends ArrayList
public class FetchProfile extends ArrayList<Object>
{
/**
* Default items available for pre-fetching. It should be expected that any

View File

@ -75,11 +75,13 @@ public class MimeMessage extends Message
parser.parse(new EOLConvertingInputStream(in));
}
@Override
public Date getReceivedDate() throws MessagingException
{
return null;
}
@Override
public Date getSentDate() throws MessagingException
{
if (mSentDate == null)
@ -116,6 +118,7 @@ public class MimeMessage extends Message
setInternalSentDate(sentDate);
}
@Override
public void setSentDate(Date sentDate) throws MessagingException
{
removeHeader("Date");
@ -127,6 +130,7 @@ public class MimeMessage extends Message
this.mSentDate = sentDate;
}
@Override
public String getContentType() throws MessagingException
{
String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE);
@ -167,6 +171,7 @@ public class MimeMessage extends Message
* Returns a list of the given recipient type from this message. If no addresses are
* found the method returns an empty array.
*/
@Override
public Address[] getRecipients(RecipientType type) throws MessagingException
{
if (type == RecipientType.TO)
@ -199,6 +204,7 @@ public class MimeMessage extends Message
}
}
@Override
public void setRecipients(RecipientType type, Address[] addresses) throws MessagingException
{
if (type == RecipientType.TO)
@ -249,16 +255,19 @@ public class MimeMessage extends Message
/**
* Returns the unfolded, decoded value of the Subject header.
*/
@Override
public String getSubject() throws MessagingException
{
return MimeUtility.unfoldAndDecode(getFirstHeader("Subject"));
}
@Override
public void setSubject(String subject) throws MessagingException
{
setHeader("Subject", subject);
}
@Override
public Address[] getFrom() throws MessagingException
{
if (mFrom == null)
@ -273,6 +282,7 @@ public class MimeMessage extends Message
return mFrom;
}
@Override
public void setFrom(Address from) throws MessagingException
{
if (from != null)
@ -289,6 +299,7 @@ public class MimeMessage extends Message
}
}
@Override
public Address[] getReplyTo() throws MessagingException
{
if (mReplyTo == null)
@ -298,6 +309,7 @@ public class MimeMessage extends Message
return mReplyTo;
}
@Override
public void setReplyTo(Address[] replyTo) throws MessagingException
{
if (replyTo == null || replyTo.length == 0)
@ -312,6 +324,7 @@ public class MimeMessage extends Message
}
}
@Override
public String getMessageId() throws MessagingException
{
if (mMessageId == null)
@ -336,11 +349,13 @@ public class MimeMessage extends Message
mMessageId = messageId;
}
@Override
public void setInReplyTo(String inReplyTo) throws MessagingException
{
setHeader("In-Reply-To", inReplyTo);
}
@Override
public String[] getReferences() throws MessagingException
{
if (mReferences == null)
@ -350,21 +365,25 @@ public class MimeMessage extends Message
return mReferences;
}
@Override
public void setReferences(String references) throws MessagingException
{
setHeader("References", references);
}
@Override
public void saveChanges() throws MessagingException
{
throw new MessagingException("saveChanges not yet implemented");
}
@Override
public Body getBody() throws MessagingException
{
return mBody;
}
@Override
public void setBody(Body body) throws MessagingException
{
this.mBody = body;
@ -388,21 +407,25 @@ public class MimeMessage extends Message
return mHeader.getFirstHeader(name);
}
@Override
public void addHeader(String name, String value)
{
mHeader.addHeader(name, value);
}
@Override
public void setHeader(String name, String value)
{
mHeader.setHeader(name, value);
}
@Override
public String[] getHeader(String name)
{
return mHeader.getHeader(name);
}
@Override
public void removeHeader(String name)
{
mHeader.removeHeader(name);
@ -431,6 +454,7 @@ public class MimeMessage extends Message
return null;
}
@Override
public void setEncoding(String encoding)
{
if (mBody instanceof Multipart)
@ -446,13 +470,13 @@ public class MimeMessage extends Message
class MimeMessageBuilder implements ContentHandler
{
private Stack stack = new Stack();
private Stack<Object> stack = new Stack<Object>();
public MimeMessageBuilder()
{
}
private void expect(Class c)
private void expect(Class<?> c)
{
if (!c.isInstance(stack.peek()))
{

View File

@ -64,6 +64,7 @@ public class MimeMultipart extends Multipart
this.mPreamble = preamble;
}
@Override
public String getContentType() throws MessagingException
{
return mContentType;

View File

@ -550,6 +550,7 @@ public class ImapResponseParser
}
}
@Override
public String toString()
{
return "#" + (mCommandContinuationRequested ? "+" : mTag) + "# " + super.toString();

View File

@ -479,6 +479,7 @@ public class ImapStore extends Store
return handleUntaggedResponses(mConnection.executeSimpleCommand(command, sensitve, untaggedHandler));
}
@Override
public void open(OpenMode mode) throws MessagingException
{
internalOpen(mode);
@ -579,6 +580,7 @@ public class ImapStore extends Store
}
@Override
public boolean isOpen()
{
return mConnection != null;
@ -590,6 +592,7 @@ public class ImapStore extends Store
return mMode;
}
@Override
public void close()
{
if (mMessageCount != -1)
@ -608,6 +611,7 @@ public class ImapStore extends Store
}
}
@Override
public String getName()
{
return mName;
@ -633,6 +637,7 @@ public class ImapStore extends Store
}
}
@Override
public boolean exists() throws MessagingException
{
if (mExists)
@ -680,6 +685,7 @@ public class ImapStore extends Store
}
}
@Override
public boolean create(FolderType type) throws MessagingException
{
/*
@ -782,6 +788,7 @@ public class ImapStore extends Store
setFlags(messages, new Flag[] { Flag.DELETED }, true);
}
@Override
public void delete(Message[] messages, String trashFolderName) throws MessagingException
{
if (messages.length == 0)
@ -955,11 +962,13 @@ public class ImapStore extends Store
}
@Override
public Message[] getMessages(MessageRetrievalListener listener) throws MessagingException
{
return getMessages(null, listener);
}
@Override
public Message[] getMessages(String[] uids, MessageRetrievalListener listener)
throws MessagingException
{
@ -1004,6 +1013,7 @@ public class ImapStore extends Store
return messages.toArray(new Message[] {});
}
@Override
public void fetch(Message[] messages, FetchProfile fp, MessageRetrievalListener listener)
throws MessagingException
{
@ -1525,6 +1535,7 @@ public class ImapStore extends Store
* the new UID of the given message on the IMAP server and sets the Message's UID to the
* new server UID.
*/
@Override
public void appendMessages(Message[] messages) throws MessagingException
{
checkOpen();
@ -1577,6 +1588,7 @@ public class ImapStore extends Store
}
}
@Override
public String getUidFromMessageId(Message message) throws MessagingException
{
try
@ -1617,6 +1629,7 @@ public class ImapStore extends Store
}
@Override
public void expunge() throws MessagingException
{
checkOpen();
@ -1676,6 +1689,7 @@ public class ImapStore extends Store
}
}
@Override
public String getNewPushState(String oldPushStateS, Message message)
{
try
@ -1702,6 +1716,7 @@ public class ImapStore extends Store
}
@Override
public void setFlags(Message[] messages, Flag[] flags, boolean value)
throws MessagingException
{
@ -1771,6 +1786,12 @@ public class ImapStore extends Store
}
return super.equals(o);
}
@Override
public int hashCode()
{
return getPrefixedName().hashCode();
}
protected ImapStore getStore()
{
@ -2430,6 +2451,7 @@ public class ImapStore extends Store
this.mSize = size;
}
@Override
public void parse(InputStream in) throws IOException, MessagingException
{
super.parse(in);
@ -3118,6 +3140,7 @@ public class ImapStore extends Store
}
return new ImapPushState(newUidNext);
}
@Override
public String toString()
{
return "uidNext=" + uidNext;

View File

@ -584,11 +584,13 @@ public class LocalStore extends Store implements Serializable
}
}
@Override
public boolean isMoveCapable()
{
return true;
}
@Override
public boolean isCopyCapable()
{
return true;
@ -900,6 +902,7 @@ public class LocalStore extends Store implements Serializable
return true;
}
@Override
public boolean create(FolderType type, int visibleLimit) throws MessagingException
{
if (exists())
@ -961,6 +964,7 @@ public class LocalStore extends Store implements Serializable
new Object[] { mUnreadMessageCount, mFolderId });
}
@Override
public void setLastChecked(long lastChecked) throws MessagingException
{
open(OpenMode.READ_WRITE);
@ -969,6 +973,7 @@ public class LocalStore extends Store implements Serializable
new Object[] { lastChecked, mFolderId });
}
@Override
public void setLastPush(long lastChecked) throws MessagingException
{
open(OpenMode.READ_WRITE);
@ -1007,6 +1012,7 @@ public class LocalStore extends Store implements Serializable
new Object[] { mVisibleLimit, mFolderId });
}
@Override
public void setStatus(String status) throws MessagingException
{
open(OpenMode.READ_WRITE);
@ -1050,6 +1056,7 @@ public class LocalStore extends Store implements Serializable
}
@Override
public FolderClass getPushClass()
{
if (FolderClass.INHERITED == pushClass)
@ -1156,6 +1163,7 @@ public class LocalStore extends Store implements Serializable
editor.commit();
}
@Override
public void refresh(Preferences preferences) throws MessagingException
{
@ -2311,6 +2319,7 @@ public class LocalStore extends Store implements Serializable
* changes.
*/
@Override
public void writeTo(OutputStream out) throws IOException, MessagingException
{
if (mMessageDirty) buildMimeRepresentation();
@ -2361,6 +2370,7 @@ public class LocalStore extends Store implements Serializable
}
@Override
public void setMessageId(String messageId)
{
mMessageId = messageId;
@ -2374,6 +2384,7 @@ public class LocalStore extends Store implements Serializable
return mAttachmentCount;
}
@Override
public void setFrom(Address from) throws MessagingException
{
this.mFrom = new Address[] { from };
@ -2381,6 +2392,7 @@ public class LocalStore extends Store implements Serializable
}
@Override
public void setReplyTo(Address[] replyTo) throws MessagingException
{
if (replyTo == null || replyTo.length == 0)
@ -2454,6 +2466,7 @@ public class LocalStore extends Store implements Serializable
return mId;
}
@Override
public void setFlag(Flag flag, boolean set) throws MessagingException
{
if (flag == Flag.DELETED && set)
@ -2554,6 +2567,7 @@ public class LocalStore extends Store implements Serializable
}
@Override
public void addHeader(String name, String value)
{
if (!mHeadersLoaded)
@ -2563,6 +2577,7 @@ public class LocalStore extends Store implements Serializable
super.addHeader(name, value);
}
@Override
public void setHeader(String name, String value)
{
if (!mHeadersLoaded)
@ -2570,6 +2585,7 @@ public class LocalStore extends Store implements Serializable
super.setHeader(name, value);
}
@Override
public String[] getHeader(String name)
{
if (!mHeadersLoaded)
@ -2578,6 +2594,7 @@ public class LocalStore extends Store implements Serializable
return super.getHeader(name);
}
@Override
public void removeHeader(String name)
{
if (!mHeadersLoaded)
@ -2613,6 +2630,7 @@ public class LocalStore extends Store implements Serializable
mAttachmentId = attachmentId;
}
@Override
public String toString()
{
return "" + mAttachmentId;
@ -2644,10 +2662,6 @@ public class LocalStore extends Store implements Serializable
*/
return new ByteArrayInputStream(new byte[0]);
}
catch (IOException ioe)
{
throw new MessagingException("Invalid attachment.", ioe);
}
}
public void writeTo(OutputStream out) throws IOException, MessagingException

View File

@ -318,6 +318,7 @@ public class Pop3Store extends Store
mUidToMsgNumMap.clear();
}
@Override
public boolean isOpen()
{
return (mIn != null && mOut != null && mSocket != null
@ -625,6 +626,7 @@ public class Pop3Store extends Store
* @param fp
* @throws MessagingException
*/
@Override
public void fetch(Message[] messages, FetchProfile fp, MessageRetrievalListener listener)
throws MessagingException
{
@ -745,7 +747,7 @@ public class Pop3Store extends Store
String response = executeSimpleCommand(String.format("LIST %d",
mUidToMsgNumMap.get(pop3Message.getUid())));
String[] listParts = response.split(" ");
int msgNum = Integer.parseInt(listParts[1]);
//int msgNum = Integer.parseInt(listParts[1]);
int msgSize = Integer.parseInt(listParts[2]);
pop3Message.setSize(msgSize);
if (listener != null)
@ -846,14 +848,17 @@ public class Pop3Store extends Store
return PERMANENT_FLAGS;
}
@Override
public void appendMessages(Message[] messages) throws MessagingException
{
}
@Override
public void delete(boolean recurse) throws MessagingException
{
}
@Override
public void delete(Message[] msgs, String trashFolderName) throws MessagingException
{
setFlags(msgs, new Flag[] { Flag.DELETED }, true);
@ -873,6 +878,7 @@ public class Pop3Store extends Store
setFlags(messages, flags, value);
}
@Override
public void setFlags(Message[] messages, Flag[] flags, boolean value)
throws MessagingException
{
@ -1066,6 +1072,12 @@ public class Pop3Store extends Store
}
return super.equals(o);
}
@Override
public int hashCode()
{
return mName.hashCode();
}
}//Pop3Folder
@ -1084,6 +1096,7 @@ public class Pop3Store extends Store
mSize = size;
}
@Override
protected void parse(InputStream in) throws IOException, MessagingException
{
super.parse(in);
@ -1119,6 +1132,7 @@ public class Pop3Store extends Store
public boolean uidl;
public boolean pipelining;
@Override
public String toString()
{
return String.format("STLS %b, TOP %b, USER %b, UIDL %b, PIPELINING %b",

View File

@ -69,11 +69,6 @@ public final class TrustManagerFactory
return me;
}
public void setHost(String host)
{
mHost = host;
}
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException
{

View File

@ -925,7 +925,6 @@ public class WebDavStore extends Store
try
{
int statusCode = -1;
StringEntity messageEntity = null;
HttpGeneric httpmethod = new HttpGeneric(url);
HttpResponse response;
HttpEntity entity;
@ -1879,7 +1878,6 @@ public class WebDavStore extends Store
String messageBody = "";
HashMap<String, String> headers = new HashMap<String, String>();
HashMap<String, String> uidToUrl = getMessageUrls(uids);
DataSet dataset = new DataSet();
String[] urls = new String[uids.length];
for (int i = 0, count = uids.length; i < count; i++)
@ -1897,7 +1895,6 @@ public class WebDavStore extends Store
private void deleteServerMessages(String[] uids) throws MessagingException
{
HashMap<String, String> uidToUrl = getMessageUrls(uids);
String[] urls = new String[uids.length];
for (int i = 0, count = uids.length; i < count; i++)
{
@ -1955,6 +1952,7 @@ public class WebDavStore extends Store
try
{
/*
String subject;
try
@ -1966,6 +1964,8 @@ public class WebDavStore extends Store
Log.e(K9.LOG_TAG, "MessagingException while retrieving Subject: " + e);
subject = "";
}
*/
ByteArrayOutputStream out;
try
{
@ -2034,7 +2034,14 @@ public class WebDavStore extends Store
{
return false;
}
@Override
public int hashCode()
{
return super.hashCode();
}
@Override
public String getUidFromMessageId(Message message) throws MessagingException
{
Log.e(K9.LOG_TAG, "Unimplemented method getUidFromMessageId in WebDavStore.WebDavFolder could lead to duplicate messages "
@ -2042,6 +2049,7 @@ public class WebDavStore extends Store
return null;
}
@Override
public void setFlags(Flag[] flags, boolean value) throws MessagingException
{
Log.e(K9.LOG_TAG, "Unimplemented method setFlags(Flag[], boolean) breaks markAllMessagesAsRead and EmptyTrash");
@ -2130,6 +2138,7 @@ public class WebDavStore extends Store
this.mSize = size;
}
@Override
public void parse(InputStream in) throws IOException, MessagingException
{
super.parse(in);
@ -2318,8 +2327,8 @@ public class WebDavStore extends Store
*/
public class DataSet
{
private HashMap<String, HashMap> mData = new HashMap<String, HashMap>();
private HashMap<String, String> mLostData = new HashMap<String, String>();
private HashMap<String, HashMap<String, String>> mData = new HashMap<String, HashMap<String, String>>();
//private HashMap<String, String> mLostData = new HashMap<String, String>();
private String mUid = "";
private HashMap<String, String> mTempData = new HashMap<String, String>();
@ -2352,8 +2361,8 @@ public class WebDavStore extends Store
/* Lost Data are for requests that don't include a message UID.
* These requests should only have a depth of one for the response so it will never get stomped over.
*/
mLostData = mTempData;
String visibleCount = mLostData.get("visiblecount");
//mLostData = mTempData;
//String visibleCount = mLostData.get("visiblecount");
}
mUid = "";

View File

@ -141,6 +141,7 @@ public class SmtpTransport extends Transport
}
}
@Override
public void open() throws MessagingException
{
try
@ -284,6 +285,7 @@ public class SmtpTransport extends Transport
}
}
@Override
public void sendMessage(Message message) throws MessagingException
{
close();
@ -344,6 +346,7 @@ public class SmtpTransport extends Transport
}
@Override
public void close()
{
try

View File

@ -24,10 +24,6 @@ public class WebDavTransport extends Transport
String host;
int mPort;
private int mConnectionSecurity;
private String mUsername; /* Stores the username for authentications */
private String mPassword; /* Stores the password for authentications */
private String mUrl; /* Stores the base URL for the server */
boolean mSecure;
Socket mSocket;
@ -51,6 +47,7 @@ public class WebDavTransport extends Transport
Log.d(K9.LOG_TAG, ">>> New WebDavTransport creation complete");
}
@Override
public void open() throws MessagingException
{
if (K9.DEBUG)
@ -59,10 +56,12 @@ public class WebDavTransport extends Transport
store.getHttpClient();
}
@Override
public void close()
{
}
@Override
public void sendMessage(Message message) throws MessagingException
{

View File

@ -9,7 +9,6 @@ import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import com.fsck.k9.Account;
@ -252,7 +251,7 @@ public class AttachmentProvider extends ContentProvider
List<String> segments = uri.getPathSegments();
String dbName = segments.get(0);
String id = segments.get(1);
String format = segments.get(2);
//String format = segments.get(2);
String path = getContext().getDatabasePath(dbName).getAbsolutePath();
String name = null;
int size = -1;

View File

@ -2,11 +2,8 @@ package com.fsck.k9.remotecontrol;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
/**
* Utillity definitions for Android applications to control the behavior of K-9 Mail. All such applications must declare the following permission:

View File

@ -23,6 +23,7 @@ public class BootReceiver extends CoreReceiver
public static String ALARMED_INTENT = "com.fsck.k9.service.BroadcastReceiver.pendingIntent";
public static String AT_TIME = "com.fsck.k9.service.BroadcastReceiver.atTime";
@Override
public Integer receive(Context context, Intent intent, Integer tmpWakeLockId)
{
if (K9.DEBUG)

View File

@ -54,6 +54,7 @@ public class CoreReceiver extends BroadcastReceiver
}
}
@Override
public void onReceive(Context context, Intent intent)
{
Integer tmpWakeLockId = CoreReceiver.getWakeLock(context);

View File

@ -481,6 +481,7 @@ public class MailService extends CoreService
}
@Override
public IBinder onBind(Intent intent)
{
return null;

View File

@ -2,7 +2,6 @@ package com.fsck.k9.service;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;

View File

@ -15,6 +15,7 @@ import static com.fsck.k9.remotecontrol.K9RemoteControl.*;
public class RemoteControlReceiver extends CoreReceiver
{
@Override
public Integer receive(Context context, Intent intent, Integer tmpWakeLockId)
{
if (K9.DEBUG)