From 28e882782776861e54064d863dbb27ddeaa7aa9d Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 16 Dec 2008 23:34:01 +0000 Subject: [PATCH] Even more progressive rename/unfork work --- AndroidManifest.xml | 10 +- build.xml | 2 +- src/com/android/email/Account.java | 6 +- src/com/android/email/{k9.java => Email.java} | 14 +-- .../android/email/EmailAddressAdapter.java | 4 +- .../android/email/EmailAddressValidator.java | 4 +- .../android/email/FixedLengthInputStream.java | 2 +- src/com/android/email/Manifest.java | 4 +- .../android/email/MessagingController.java | 66 +++++------ src/com/android/email/MessagingListener.java | 8 +- .../android/email/PeekableInputStream.java | 2 +- src/com/android/email/Preferences.java | 4 +- src/com/android/email/Utility.java | 4 +- src/com/android/email/activity/Accounts.java | 28 ++--- src/com/android/email/activity/Debug.java | 20 ++-- .../email/activity/FolderMessageList.java | 62 +++++----- .../email/activity/MessageCompose.java | 76 ++++++------- .../android/email/activity/MessageView.java | 62 +++++----- .../email/activity/ProgressListener.java | 2 +- src/com/android/email/activity/Welcome.java | 10 +- .../email/activity/setup/AccountSettings.java | 12 +- .../setup/AccountSetupAccountType.java | 6 +- .../activity/setup/AccountSetupBasics.java | 22 ++-- .../setup/AccountSetupCheckSettings.java | 18 +-- .../setup/AccountSetupComposition.java | 12 +- .../activity/setup/AccountSetupIncoming.java | 10 +- .../activity/setup/AccountSetupNames.java | 16 +-- .../activity/setup/AccountSetupOptions.java | 12 +- .../activity/setup/AccountSetupOutgoing.java | 10 +- .../email/activity/setup/SpinnerOption.java | 2 +- .../android/email/codec/binary/Base64.java | 2 +- .../codec/binary/Base64OutputStream.java | 2 +- src/com/android/email/mail/Address.java | 10 +- .../mail/AuthenticationFailedException.java | 2 +- src/com/android/email/mail/Body.java | 2 +- src/com/android/email/mail/BodyPart.java | 2 +- .../mail/CertificateValidationException.java | 2 +- src/com/android/email/mail/FetchProfile.java | 2 +- src/com/android/email/mail/Flag.java | 2 +- src/com/android/email/mail/Folder.java | 2 +- src/com/android/email/mail/Message.java | 2 +- .../email/mail/MessageDateComparator.java | 2 +- .../email/mail/MessageRetrievalListener.java | 2 +- .../email/mail/MessagingException.java | 2 +- src/com/android/email/mail/Multipart.java | 2 +- .../email/mail/NoSuchProviderException.java | 2 +- src/com/android/email/mail/Part.java | 2 +- src/com/android/email/mail/Store.java | 10 +- src/com/android/email/mail/Transport.java | 6 +- .../mail/internet/BinaryTempFileBody.java | 10 +- .../email/mail/internet/MimeBodyPart.java | 12 +- .../email/mail/internet/MimeHeader.java | 6 +- .../email/mail/internet/MimeMessage.java | 18 +-- .../email/mail/internet/MimeMultipart.java | 8 +- .../email/mail/internet/MimeUtility.java | 18 +-- .../android/email/mail/internet/TextBody.java | 8 +- .../email/mail/store/ImapResponseParser.java | 14 +-- .../android/email/mail/store/ImapStore.java | 60 +++++----- .../android/email/mail/store/LocalStore.java | 52 ++++----- .../android/email/mail/store/Pop3Store.java | 36 +++--- .../email/mail/store/TrustManagerFactory.java | 6 +- .../android/email/mail/store/WebDavStore.java | 106 +++++++++--------- .../mail/transport/CountingOutputStream.java | 2 +- .../transport/EOLConvertingOutputStream.java | 2 +- .../email/mail/transport/SmtpTransport.java | 36 +++--- .../mail/transport/StatusOutputStream.java | 6 +- .../email/mail/transport/WebDavTransport.java | 50 ++++----- .../email/provider/AttachmentProvider.java | 12 +- .../android/email/service/BootReceiver.java | 4 +- .../android/email/service/MailService.java | 36 +++--- 70 files changed, 535 insertions(+), 535 deletions(-) rename src/com/android/email/{k9.java => Email.java} (94%) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 53cadc3a1..9cd9e97fe 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,6 +1,6 @@ @@ -10,12 +10,12 @@ - - + @@ -131,10 +131,10 @@ diff --git a/build.xml b/build.xml index 320a5ef71..2da9a786a 100644 --- a/build.xml +++ b/build.xml @@ -7,7 +7,7 @@ - + diff --git a/src/com/android/email/Account.java b/src/com/android/email/Account.java index f5135e3c4..08d5fa102 100644 --- a/src/com/android/email/Account.java +++ b/src/com/android/email/Account.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.io.Serializable; import java.util.Arrays; @@ -306,7 +306,7 @@ public class Account implements Serializable { public int getDisplayCount() { if (mDisplayCount == -1) { - this.mDisplayCount = k9.DEFAULT_VISIBLE_LIMIT; + this.mDisplayCount = Email.DEFAULT_VISIBLE_LIMIT; } return mDisplayCount; } @@ -325,7 +325,7 @@ public class Account implements Serializable { if (displayCount != -1) { this.mDisplayCount = displayCount; } else { - this.mDisplayCount = k9.DEFAULT_VISIBLE_LIMIT; + this.mDisplayCount = Email.DEFAULT_VISIBLE_LIMIT; } } diff --git a/src/com/android/email/k9.java b/src/com/android/email/Email.java similarity index 94% rename from src/com/android/email/k9.java rename to src/com/android/email/Email.java index be8053850..f303962f1 100644 --- a/src/com/android/email/k9.java +++ b/src/com/android/email/Email.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.io.File; @@ -10,13 +10,13 @@ import android.content.pm.PackageManager; import android.util.Config; import android.util.Log; -import com.fsck.k9.activity.MessageCompose; -import com.fsck.k9.mail.internet.BinaryTempFileBody; -import com.fsck.k9.mail.internet.MimeMessage; -import com.fsck.k9.service.BootReceiver; -import com.fsck.k9.service.MailService; +import com.android.email.activity.MessageCompose; +import com.android.email.mail.internet.BinaryTempFileBody; +import com.android.email.mail.internet.MimeMessage; +import com.android.email.service.BootReceiver; +import com.android.email.service.MailService; -public class k9 extends Application { +public class Email extends Application { public static Application app = null; public static File tempDirectory; public static final String LOG_TAG = "k9"; diff --git a/src/com/android/email/EmailAddressAdapter.java b/src/com/android/email/EmailAddressAdapter.java index f547bafe7..45636c0b9 100644 --- a/src/com/android/email/EmailAddressAdapter.java +++ b/src/com/android/email/EmailAddressAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.fsck.k9; +package com.android.email; import static android.provider.Contacts.ContactMethods.CONTENT_EMAIL_URI; import android.content.ContentResolver; @@ -27,7 +27,7 @@ import android.view.View; import android.widget.ResourceCursorAdapter; import android.widget.TextView; -import com.fsck.k9.mail.Address; +import com.android.email.mail.Address; public class EmailAddressAdapter extends ResourceCursorAdapter { public static final int NAME_INDEX = 1; diff --git a/src/com/android/email/EmailAddressValidator.java b/src/com/android/email/EmailAddressValidator.java index 9a7ca21c3..2a0b65dc0 100644 --- a/src/com/android/email/EmailAddressValidator.java +++ b/src/com/android/email/EmailAddressValidator.java @@ -1,7 +1,7 @@ -package com.fsck.k9; +package com.android.email; -import com.fsck.k9.mail.Address; +import com.android.email.mail.Address; import android.util.Config; import android.util.Log; diff --git a/src/com/android/email/FixedLengthInputStream.java b/src/com/android/email/FixedLengthInputStream.java index 457e7c3ca..ac24641d0 100644 --- a/src/com/android/email/FixedLengthInputStream.java +++ b/src/com/android/email/FixedLengthInputStream.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.io.IOException; import java.io.InputStream; diff --git a/src/com/android/email/Manifest.java b/src/com/android/email/Manifest.java index 80158aa5a..fbb008584 100644 --- a/src/com/android/email/Manifest.java +++ b/src/com/android/email/Manifest.java @@ -5,10 +5,10 @@ * should not be modified by hand. */ -package com.fsck.k9; +package com.android.email; public final class Manifest { public static final class permission { - public static final String READ_ATTACHMENT="com.fsck.k9.permission.READ_ATTACHMENT"; + public static final String READ_ATTACHMENT="com.android.email.permission.READ_ATTACHMENT"; } } diff --git a/src/com/android/email/MessagingController.java b/src/com/android/email/MessagingController.java index 0390b6e39..bbbdebf77 100644 --- a/src/com/android/email/MessagingController.java +++ b/src/com/android/email/MessagingController.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.util.ArrayList; import java.util.Collections; @@ -15,23 +15,23 @@ import android.os.Process; import android.util.Config; import android.util.Log; -import com.fsck.k9.mail.FetchProfile; -import com.fsck.k9.mail.Flag; -import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessageRetrievalListener; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Part; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.Transport; -import com.fsck.k9.mail.Folder.FolderType; -import com.fsck.k9.mail.Folder.OpenMode; -import com.fsck.k9.mail.internet.MimeHeader; -import com.fsck.k9.mail.internet.MimeUtility; -import com.fsck.k9.mail.store.LocalStore; -import com.fsck.k9.mail.store.LocalStore.LocalFolder; -import com.fsck.k9.mail.store.LocalStore.LocalMessage; -import com.fsck.k9.mail.store.LocalStore.PendingCommand; +import com.android.email.mail.FetchProfile; +import com.android.email.mail.Flag; +import com.android.email.mail.Folder; +import com.android.email.mail.Message; +import com.android.email.mail.MessageRetrievalListener; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Part; +import com.android.email.mail.Store; +import com.android.email.mail.Transport; +import com.android.email.mail.Folder.FolderType; +import com.android.email.mail.Folder.OpenMode; +import com.android.email.mail.internet.MimeHeader; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.store.LocalStore; +import com.android.email.mail.store.LocalStore.LocalFolder; +import com.android.email.mail.store.LocalStore.LocalMessage; +import com.android.email.mail.store.LocalStore.PendingCommand; /** * Starts a long running (application) Thread that will run through commands @@ -67,11 +67,11 @@ public class MessagingController implements Runnable { private static final int MAX_SMALL_MESSAGE_SIZE = (25 * 1024); private static final String PENDING_COMMAND_TRASH = - "com.fsck.k9.MessagingController.trash"; + "com.android.email.MessagingController.trash"; private static final String PENDING_COMMAND_MARK_READ = - "com.fsck.k9.MessagingController.markRead"; + "com.android.email.MessagingController.markRead"; private static final String PENDING_COMMAND_APPEND = - "com.fsck.k9.MessagingController.append"; + "com.android.email.MessagingController.append"; private static MessagingController inst = null; private BlockingQueue mCommands = new LinkedBlockingQueue(); @@ -118,7 +118,7 @@ public class MessagingController implements Runnable { } catch (Exception e) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "Error running command", e); + Log.v(Email.LOG_TAG, "Error running command", e); } } mBusy = false; @@ -218,7 +218,7 @@ public class MessagingController implements Runnable { */ for (Folder localFolder : localFolders) { String localFolderName = localFolder.getName(); - if (localFolderName.equalsIgnoreCase(k9.INBOX) || + if (localFolderName.equalsIgnoreCase(Email.INBOX) || localFolderName.equals(account.getTrashFolderName()) || localFolderName.equals(account.getOutboxFolderName()) || localFolderName.equals(account.getDraftsFolderName()) || @@ -313,7 +313,7 @@ public class MessagingController implements Runnable { localStore.resetVisibleLimits(account.getDisplayCount()); } catch (MessagingException e) { - Log.e(k9.LOG_TAG, "Unable to reset visible limits", e); + Log.e(Email.LOG_TAG, "Unable to reset visible limits", e); } } } @@ -406,8 +406,8 @@ public class MessagingController implements Runnable { Open the folder Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash) Get the message count - Get the list of the newest k9.DEFAULT_VISIBLE_LIMIT messages - getMessages(messageCount - k9.DEFAULT_VISIBLE_LIMIT, messageCount) + Get the list of the newest Email.DEFAULT_VISIBLE_LIMIT messages + getMessages(messageCount - Email.DEFAULT_VISIBLE_LIMIT, messageCount) See if we have each message locally, if not fetch it's flags and envelope Get and update the unread count for the folder Update the remote flags of any messages we have locally with an internal date @@ -537,7 +537,7 @@ s * critical data as fast as possible, and then we'll fill in the de } } catch (Exception e) { - Log.e(k9.LOG_TAG, + Log.e(Email.LOG_TAG, "Error while storing downloaded message.", e); } @@ -745,7 +745,7 @@ s * critical data as fast as possible, and then we'll fill in the de } catch (Exception e) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "synchronizeMailbox", e); + Log.v(Email.LOG_TAG, "synchronizeMailbox", e); } for (MessagingListener l : mListeners) { l.synchronizeMailboxFailed( @@ -776,7 +776,7 @@ s * critical data as fast as possible, and then we'll fill in the de } catch (MessagingException me) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "processPendingCommands", me); + Log.v(Email.LOG_TAG, "processPendingCommands", me); } /* * Ignore any exceptions from the commands. Commands will be processed @@ -1223,7 +1223,7 @@ s * critical data as fast as possible, and then we'll fill in the de } catch (MessagingException me) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "", me); + Log.v(Email.LOG_TAG, "", me); } for (MessagingListener l : mListeners) { l.loadAttachmentFailed(account, message, part, tag, me.getMessage()); @@ -1410,7 +1410,7 @@ s * critical data as fast as possible, and then we'll fill in the de catch (Exception e) { // TODO if (Config.LOGV) { - Log.v(k9.LOG_TAG, "emptyTrash"); + Log.v(Email.LOG_TAG, "emptyTrash"); } } } @@ -1449,7 +1449,7 @@ s * critical data as fast as possible, and then we'll fill in the de if (autoCheckIntervalTime>0 && (now-lastAutoCheckTime)>autoCheckIntervalTime) { sendPendingMessagesSynchronous(account); - synchronizeMailboxSynchronous(account, k9.INBOX); + synchronizeMailboxSynchronous(account, Email.INBOX); //This saves the last auto check time even if sync fails //TODO: Listen for both send and sync success and failures //and only save last auto check time is not errors @@ -1485,7 +1485,7 @@ s * critical data as fast as possible, and then we'll fill in the de processPendingCommands(account); } catch (MessagingException e) { - Log.e(k9.LOG_TAG, "Unable to save message as draft.", e); + Log.e(Email.LOG_TAG, "Unable to save message as draft.", e); } } diff --git a/src/com/android/email/MessagingListener.java b/src/com/android/email/MessagingListener.java index 17780e778..f367c6e0b 100644 --- a/src/com/android/email/MessagingListener.java +++ b/src/com/android/email/MessagingListener.java @@ -1,11 +1,11 @@ -package com.fsck.k9; +package com.android.email; import android.content.Context; -import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.Part; +import com.android.email.mail.Folder; +import com.android.email.mail.Message; +import com.android.email.mail.Part; /** * Defines the interface that MessagingController will use to callback to requesters. This class diff --git a/src/com/android/email/PeekableInputStream.java b/src/com/android/email/PeekableInputStream.java index 2039c7ed0..1ee269f21 100644 --- a/src/com/android/email/PeekableInputStream.java +++ b/src/com/android/email/PeekableInputStream.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.io.IOException; import java.io.InputStream; diff --git a/src/com/android/email/Preferences.java b/src/com/android/email/Preferences.java index 75b75364a..24fa17ee0 100644 --- a/src/com/android/email/Preferences.java +++ b/src/com/android/email/Preferences.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.util.Arrays; @@ -116,7 +116,7 @@ public class Preferences { public void dump() { if (Config.LOGV) { for (String key : mSharedPreferences.getAll().keySet()) { - Log.v(k9.LOG_TAG, key + " = " + mSharedPreferences.getAll().get(key)); + Log.v(Email.LOG_TAG, key + " = " + mSharedPreferences.getAll().get(key)); } } } diff --git a/src/com/android/email/Utility.java b/src/com/android/email/Utility.java index 08f643f3b..a06b7c165 100644 --- a/src/com/android/email/Utility.java +++ b/src/com/android/email/Utility.java @@ -1,5 +1,5 @@ -package com.fsck.k9; +package com.android.email; import java.io.IOException; import java.io.InputStream; @@ -7,7 +7,7 @@ import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Date; -import com.fsck.k9.codec.binary.Base64; +import com.android.email.codec.binary.Base64; import android.text.Editable; import android.widget.TextView; diff --git a/src/com/android/email/activity/Accounts.java b/src/com/android/email/activity/Accounts.java index 3010eaf20..feba03a48 100644 --- a/src/com/android/email/activity/Accounts.java +++ b/src/com/android/email/activity/Accounts.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import android.app.AlertDialog; import android.app.Dialog; @@ -24,17 +24,17 @@ import android.widget.TextView; import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.OnItemClickListener; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.MessagingController; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.activity.setup.AccountSettings; -import com.fsck.k9.activity.setup.AccountSetupBasics; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.store.LocalStore; -import com.fsck.k9.mail.store.LocalStore.LocalFolder; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.MessagingController; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.activity.setup.AccountSettings; +import com.android.email.activity.setup.AccountSetupBasics; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Store; +import com.android.email.mail.store.LocalStore; +import com.android.email.mail.store.LocalStore.LocalFolder; public class Accounts extends ListActivity implements OnItemClickListener, OnClickListener { private static final int DIALOG_REMOVE_ACCOUNT = 1; @@ -152,7 +152,7 @@ public class Accounts extends ListActivity implements OnItemClickListener, OnCli // Ignore } mSelectedContextAccount.delete(Preferences.getPreferences(Accounts.this)); - k9.setServicesEnabled(Accounts.this); + Email.setServicesEnabled(Accounts.this); refresh(); } }) @@ -269,7 +269,7 @@ public class Accounts extends ListActivity implements OnItemClickListener, OnCli LocalStore localStore = (LocalStore) Store.getInstance( account.getLocalStoreUri(), getApplication()); - LocalFolder localFolder = (LocalFolder) localStore.getFolder(k9.INBOX); + LocalFolder localFolder = (LocalFolder) localStore.getFolder(Email.INBOX); if (localFolder.exists()) { unreadMessageCount = localFolder.getUnreadMessageCount(); } diff --git a/src/com/android/email/activity/Debug.java b/src/com/android/email/activity/Debug.java index 8c4c51809..555b64953 100644 --- a/src/com/android/email/activity/Debug.java +++ b/src/com/android/email/activity/Debug.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import android.app.Activity; import android.os.Bundle; @@ -10,9 +10,9 @@ import android.widget.CompoundButton; import android.widget.TextView; import android.widget.CompoundButton.OnCheckedChangeListener; -import com.fsck.k9.k9; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; +import com.android.email.Email; +import com.android.email.Preferences; +import com.android.email.R; public class Debug extends Activity implements OnCheckedChangeListener { private TextView mVersionView; @@ -39,17 +39,17 @@ public class Debug extends Activity implements OnCheckedChangeListener { mVersionView.setText(String.format(getString(R.string.debug_version_fmt).toString(), getString(R.string.build_number))); - mEnableDebugLoggingView.setChecked(k9.DEBUG); - mEnableSensitiveLoggingView.setChecked(k9.DEBUG_SENSITIVE); + mEnableDebugLoggingView.setChecked(Email.DEBUG); + mEnableSensitiveLoggingView.setChecked(Email.DEBUG_SENSITIVE); } public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView.getId() == R.id.debug_logging) { - k9.DEBUG = isChecked; - mPreferences.setEnableDebugLogging(k9.DEBUG); + Email.DEBUG = isChecked; + mPreferences.setEnableDebugLogging(Email.DEBUG); } else if (buttonView.getId() == R.id.sensitive_logging) { - k9.DEBUG_SENSITIVE = isChecked; - mPreferences.setEnableSensitiveLogging(k9.DEBUG_SENSITIVE); + Email.DEBUG_SENSITIVE = isChecked; + mPreferences.setEnableSensitiveLogging(Email.DEBUG_SENSITIVE); } } diff --git a/src/com/android/email/activity/FolderMessageList.java b/src/com/android/email/activity/FolderMessageList.java index 60a7d47bc..0c76be204 100644 --- a/src/com/android/email/activity/FolderMessageList.java +++ b/src/com/android/email/activity/FolderMessageList.java @@ -1,4 +1,4 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import java.text.DateFormat; import java.util.ArrayList; @@ -32,24 +32,24 @@ import android.widget.TextView; import android.widget.Toast; import android.widget.ExpandableListView.ExpandableListContextMenuInfo; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.MessagingController; -import com.fsck.k9.MessagingListener; -import com.fsck.k9.R; -import com.fsck.k9.Utility; -import com.fsck.k9.Preferences; -import com.fsck.k9.activity.FolderMessageList.FolderMessageListAdapter.FolderInfoHolder; -import com.fsck.k9.activity.FolderMessageList.FolderMessageListAdapter.MessageInfoHolder; -import com.fsck.k9.activity.setup.AccountSettings; -import com.fsck.k9.mail.Address; -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 com.fsck.k9.mail.Message.RecipientType; -import com.fsck.k9.mail.store.LocalStore.LocalMessage; -import com.fsck.k9.mail.store.LocalStore; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.MessagingController; +import com.android.email.MessagingListener; +import com.android.email.R; +import com.android.email.Utility; +import com.android.email.Preferences; +import com.android.email.activity.FolderMessageList.FolderMessageListAdapter.FolderInfoHolder; +import com.android.email.activity.FolderMessageList.FolderMessageListAdapter.MessageInfoHolder; +import com.android.email.activity.setup.AccountSettings; +import com.android.email.mail.Address; +import com.android.email.mail.Flag; +import com.android.email.mail.Folder; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Message.RecipientType; +import com.android.email.mail.store.LocalStore.LocalMessage; +import com.android.email.mail.store.LocalStore; /** * FolderMessageList is the primary user interface for the program. This Activity shows @@ -76,11 +76,11 @@ public class FolderMessageList extends ExpandableListActivity { private static final String EXTRA_INITIAL_FOLDER = "initialFolder"; private static final String STATE_KEY_LIST = - "com.fsck.k9.activity.folderlist_expandableListState"; + "com.android.email.activity.folderlist_expandableListState"; private static final String STATE_KEY_EXPANDED_GROUP = - "com.fsck.k9.activity.folderlist_expandedGroup"; + "com.android.email.activity.folderlist_expandedGroup"; private static final String STATE_KEY_EXPANDED_GROUP_SELECTION = - "com.fsck.k9.activity.folderlist_expandedGroupSelection"; + "com.android.email.activity.folderlist_expandedGroupSelection"; private static final int UPDATE_FOLDER_ON_EXPAND_INTERVAL_MS = (1000 * 60 * 3); @@ -714,7 +714,7 @@ public class FolderMessageList extends ExpandableListActivity { } mHandler.progress(false); if (Config.LOGV) { - Log.v(k9.LOG_TAG, "listFoldersFailed " + message); + Log.v(Email.LOG_TAG, "listFoldersFailed " + message); } } @@ -745,14 +745,14 @@ public class FolderMessageList extends ExpandableListActivity { mFolders.add(holder); } holder.name = folder.getName(); - if (holder.name.equalsIgnoreCase(k9.INBOX)) { + if (holder.name.equalsIgnoreCase(Email.INBOX)) { holder.displayName = getString(R.string.special_mailbox_name_inbox); // XXX TOOD nuke when we do this for all folders try { holder.unreadMessageCount = folder.getUnreadMessageCount(); } catch (MessagingException me) { - Log.e(k9.LOG_TAG, "Folder.getUnreadMessageCount() failed", me); + Log.e(Email.LOG_TAG, "Folder.getUnreadMessageCount() failed", me); } } @@ -773,7 +773,7 @@ public class FolderMessageList extends ExpandableListActivity { holder.unreadMessageCount = folder.getUnreadMessageCount(); } catch (MessagingException me) { - Log.e(k9.LOG_TAG, "Folder.getUnreadMessageCount() failed", me); + Log.e(Email.LOG_TAG, "Folder.getUnreadMessageCount() failed", me); } */ @@ -789,7 +789,7 @@ public class FolderMessageList extends ExpandableListActivity { */ // if (mRestoredState != null) { // if (Config.LOGV) { -// Log.v(k9.LOG_TAG, "Attempting to restore list state"); +// Log.v(Email.LOG_TAG, "Attempting to restore list state"); // } // Parcelable listViewState = // mListView.onRestoreInstanceState(mListViewState); @@ -1141,7 +1141,7 @@ public class FolderMessageList extends ExpandableListActivity { else { if (folder.status == null) { // holder.main.setText(getString(R.string.message_list_load_more_messages_action)); - // holder.main.setText("Load up to " + k9.VISIBLE_LIMIT_INCREMENT + " more"); + // holder.main.setText("Load up to " + Email.VISIBLE_LIMIT_INCREMENT + " more"); holder.main.setText("Load up to " + mAccount.getDisplayCount() + " more"); } else { @@ -1227,9 +1227,9 @@ public class FolderMessageList extends ExpandableListActivity { public int compareTo(FolderInfoHolder o) { String s1 = this.name; String s2 = o.name; - if (k9.INBOX.equalsIgnoreCase(s1)) { + if (Email.INBOX.equalsIgnoreCase(s1)) { return -1; - } else if (k9.INBOX.equalsIgnoreCase(s2)) { + } else if (Email.INBOX.equalsIgnoreCase(s2)) { return 1; } else return s1.compareToIgnoreCase(s2); @@ -1276,7 +1276,7 @@ public class FolderMessageList extends ExpandableListActivity { } catch (MessagingException me) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "Unable to load message info", me); + Log.v(Email.LOG_TAG, "Unable to load message info", me); } } } diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 5a4cf273a..80c39c198 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import java.io.Serializable; import java.util.ArrayList; @@ -36,53 +36,53 @@ import android.widget.TextView; import android.widget.Toast; import android.widget.AutoCompleteTextView.Validator; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.EmailAddressAdapter; -import com.fsck.k9.EmailAddressValidator; -import com.fsck.k9.MessagingController; -import com.fsck.k9.MessagingListener; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.Utility; -import com.fsck.k9.mail.Address; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Multipart; -import com.fsck.k9.mail.Part; -import com.fsck.k9.mail.Message.RecipientType; -import com.fsck.k9.mail.internet.MimeBodyPart; -import com.fsck.k9.mail.internet.MimeHeader; -import com.fsck.k9.mail.internet.MimeMessage; -import com.fsck.k9.mail.internet.MimeMultipart; -import com.fsck.k9.mail.internet.MimeUtility; -import com.fsck.k9.mail.internet.TextBody; -import com.fsck.k9.mail.store.LocalStore; -import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBody; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.EmailAddressAdapter; +import com.android.email.EmailAddressValidator; +import com.android.email.MessagingController; +import com.android.email.MessagingListener; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Utility; +import com.android.email.mail.Address; +import com.android.email.mail.Body; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Multipart; +import com.android.email.mail.Part; +import com.android.email.mail.Message.RecipientType; +import com.android.email.mail.internet.MimeBodyPart; +import com.android.email.mail.internet.MimeHeader; +import com.android.email.mail.internet.MimeMessage; +import com.android.email.mail.internet.MimeMultipart; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.internet.TextBody; +import com.android.email.mail.store.LocalStore; +import com.android.email.mail.store.LocalStore.LocalAttachmentBody; public class MessageCompose extends Activity implements OnClickListener, OnFocusChangeListener { - private static final String ACTION_REPLY = "com.fsck.k9.intent.action.REPLY"; - private static final String ACTION_REPLY_ALL = "com.fsck.k9.intent.action.REPLY_ALL"; - private static final String ACTION_FORWARD = "com.fsck.k9.intent.action.FORWARD"; - private static final String ACTION_EDIT_DRAFT = "com.fsck.k9.intent.action.EDIT_DRAFT"; + private static final String ACTION_REPLY = "com.android.email.intent.action.REPLY"; + private static final String ACTION_REPLY_ALL = "com.android.email.intent.action.REPLY_ALL"; + private static final String ACTION_FORWARD = "com.android.email.intent.action.FORWARD"; + private static final String ACTION_EDIT_DRAFT = "com.android.email.intent.action.EDIT_DRAFT"; private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_FOLDER = "folder"; private static final String EXTRA_MESSAGE = "message"; private static final String STATE_KEY_ATTACHMENTS = - "com.fsck.k9.activity.MessageCompose.attachments"; + "com.android.email.activity.MessageCompose.attachments"; private static final String STATE_KEY_CC_SHOWN = - "com.fsck.k9.activity.MessageCompose.ccShown"; + "com.android.email.activity.MessageCompose.ccShown"; private static final String STATE_KEY_BCC_SHOWN = - "com.fsck.k9.activity.MessageCompose.bccShown"; + "com.android.email.activity.MessageCompose.bccShown"; private static final String STATE_KEY_QUOTED_TEXT_SHOWN = - "com.fsck.k9.activity.MessageCompose.quotedTextShown"; + "com.android.email.activity.MessageCompose.quotedTextShown"; private static final String STATE_KEY_SOURCE_MESSAGE_PROCED = - "com.fsck.k9.activity.MessageCompose.stateKeySourceMessageProced"; + "com.android.email.activity.MessageCompose.stateKeySourceMessageProced"; private static final String STATE_KEY_DRAFT_UID = - "com.fsck.k9.activity.MessageCompose.draftUid"; + "com.android.email.activity.MessageCompose.draftUid"; private static final int MSG_PROGRESS_ON = 1; private static final int MSG_PROGRESS_OFF = 2; @@ -373,7 +373,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus String type = intent.getType(); Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM); if (stream != null && type != null) { - if (MimeUtility.mimeTypeMatches(type, k9.ACCEPTABLE_ATTACHMENT_SEND_TYPES)) { + if (MimeUtility.mimeTypeMatches(type, Email.ACCEPTABLE_ATTACHMENT_SEND_TYPES)) { addAttachment(stream); } } @@ -615,7 +615,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus message = createMessage(); } catch (MessagingException me) { - Log.e(k9.LOG_TAG, "Failed to create new message for send or save.", me); + Log.e(Email.LOG_TAG, "Failed to create new message for send or save.", me); throw new RuntimeException("Failed to create a new message for send or save.", me); } @@ -715,7 +715,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus private void onAddAttachment() { Intent i = new Intent(Intent.ACTION_GET_CONTENT); i.addCategory(Intent.CATEGORY_OPENABLE); - i.setType(k9.ACCEPTABLE_ATTACHMENT_SEND_TYPES[0]); + i.setType(Email.ACCEPTABLE_ATTACHMENT_SEND_TYPES[0]); startActivityForResult(Intent.createChooser(i, null), ACTIVITY_REQUEST_PICK_ATTACHMENT); } diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index 8017c2406..9cdee2d1d 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import java.io.File; import java.io.FileOutputStream; @@ -48,32 +48,32 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.MessagingController; -import com.fsck.k9.MessagingListener; -import com.fsck.k9.R; -import com.fsck.k9.Utility; -import com.fsck.k9.mail.Address; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Multipart; -import com.fsck.k9.mail.Part; -import com.fsck.k9.mail.Message.RecipientType; -import com.fsck.k9.mail.internet.MimeHeader; -import com.fsck.k9.mail.internet.MimeUtility; -import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBody; -import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBodyPart; -import com.fsck.k9.mail.store.LocalStore.LocalMessage; -import com.fsck.k9.provider.AttachmentProvider; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.MessagingController; +import com.android.email.MessagingListener; +import com.android.email.R; +import com.android.email.Utility; +import com.android.email.mail.Address; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Multipart; +import com.android.email.mail.Part; +import com.android.email.mail.Message.RecipientType; +import com.android.email.mail.internet.MimeHeader; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.store.LocalStore.LocalAttachmentBody; +import com.android.email.mail.store.LocalStore.LocalAttachmentBodyPart; +import com.android.email.mail.store.LocalStore.LocalMessage; +import com.android.email.provider.AttachmentProvider; public class MessageView extends Activity implements UrlInterceptHandler, OnClickListener { - private static final String EXTRA_ACCOUNT = "com.fsck.k9.MessageView_account"; - private static final String EXTRA_FOLDER = "com.fsck.k9.MessageView_folder"; - private static final String EXTRA_MESSAGE = "com.fsck.k9.MessageView_message"; - private static final String EXTRA_FOLDER_UIDS = "com.fsck.k9.MessageView_folderUids"; - private static final String EXTRA_NEXT = "com.fsck.k9.MessageView_next"; + private static final String EXTRA_ACCOUNT = "com.android.email.MessageView_account"; + private static final String EXTRA_FOLDER = "com.android.email.MessageView_folder"; + private static final String EXTRA_MESSAGE = "com.android.email.MessageView_message"; + private static final String EXTRA_FOLDER_UIDS = "com.android.email.MessageView_folderUids"; + private static final String EXTRA_NEXT = "com.android.email.MessageView_next"; private TextView mFromView; private TextView mDateView; @@ -656,19 +656,19 @@ public class MessageView extends Activity Button attachmentDownload = (Button)view.findViewById(R.id.download); if ((!MimeUtility.mimeTypeMatches(attachment.contentType, - k9.ACCEPTABLE_ATTACHMENT_VIEW_TYPES)) + Email.ACCEPTABLE_ATTACHMENT_VIEW_TYPES)) || (MimeUtility.mimeTypeMatches(attachment.contentType, - k9.UNACCEPTABLE_ATTACHMENT_VIEW_TYPES))) { + Email.UNACCEPTABLE_ATTACHMENT_VIEW_TYPES))) { attachmentView.setVisibility(View.GONE); } if ((!MimeUtility.mimeTypeMatches(attachment.contentType, - k9.ACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES)) + Email.ACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES)) || (MimeUtility.mimeTypeMatches(attachment.contentType, - k9.UNACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES))) { + Email.UNACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES))) { attachmentDownload.setVisibility(View.GONE); } - if (attachment.size > k9.MAX_ATTACHMENT_DOWNLOAD_SIZE) { + if (attachment.size > Email.MAX_ATTACHMENT_DOWNLOAD_SIZE) { attachmentView.setVisibility(View.GONE); attachmentDownload.setVisibility(View.GONE); } @@ -724,7 +724,7 @@ public class MessageView extends Activity } catch (MessagingException me) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "loadMessageForViewHeadersAvailable", me); + Log.v(Email.LOG_TAG, "loadMessageForViewHeadersAvailable", me); } } } @@ -790,7 +790,7 @@ public class MessageView extends Activity } catch (Exception e) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "loadMessageForViewBodyAvailable", e); + Log.v(Email.LOG_TAG, "loadMessageForViewBodyAvailable", e); } } } diff --git a/src/com/android/email/activity/ProgressListener.java b/src/com/android/email/activity/ProgressListener.java index fb2382d3f..2edf0a9bf 100644 --- a/src/com/android/email/activity/ProgressListener.java +++ b/src/com/android/email/activity/ProgressListener.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity; +package com.android.email.activity; import android.content.Context; diff --git a/src/com/android/email/activity/Welcome.java b/src/com/android/email/activity/Welcome.java index 008414416..9a372cf74 100644 --- a/src/com/android/email/activity/Welcome.java +++ b/src/com/android/email/activity/Welcome.java @@ -1,9 +1,9 @@ -package com.fsck.k9.activity; +package com.android.email.activity; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.Preferences; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.Preferences; import android.app.Activity; import android.content.Intent; @@ -26,7 +26,7 @@ public class Welcome extends Activity { Account[] accounts = Preferences.getPreferences(this).getAccounts(); if (accounts.length == 1) { - FolderMessageList.actionHandleAccount(this, accounts[0], k9.INBOX); + FolderMessageList.actionHandleAccount(this, accounts[0], Email.INBOX); } else { startActivity(new Intent(this, Accounts.class)); } diff --git a/src/com/android/email/activity/setup/AccountSettings.java b/src/com/android/email/activity/setup/AccountSettings.java index 633a58270..787f41600 100644 --- a/src/com/android/email/activity/setup/AccountSettings.java +++ b/src/com/android/email/activity/setup/AccountSettings.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import android.content.Context; import android.content.Intent; @@ -13,10 +13,10 @@ import android.preference.CheckBoxPreference; import android.preference.Preference; import android.preference.RingtonePreference; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.Preferences; +import com.android.email.R; public class AccountSettings extends PreferenceActivity { private static final String EXTRA_ACCOUNT = "account"; @@ -166,7 +166,7 @@ public class AccountSettings extends PreferenceActivity { SharedPreferences prefs = mAccountRingtone.getPreferenceManager().getSharedPreferences(); mAccount.setRingtone(prefs.getString(PREFERENCE_RINGTONE, null)); mAccount.save(Preferences.getPreferences(this)); - k9.setServicesEnabled(this); + Email.setServicesEnabled(this); } @Override diff --git a/src/com/android/email/activity/setup/AccountSetupAccountType.java b/src/com/android/email/activity/setup/AccountSetupAccountType.java index 1a6a68bec..564f456b8 100644 --- a/src/com/android/email/activity/setup/AccountSetupAccountType.java +++ b/src/com/android/email/activity/setup/AccountSetupAccountType.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import java.net.URI; import java.net.URISyntaxException; @@ -12,8 +12,8 @@ import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; -import com.fsck.k9.Account; -import com.fsck.k9.R; +import com.android.email.Account; +import com.android.email.R; /** * Prompts the user to select an account type. The account type, along with the diff --git a/src/com/android/email/activity/setup/AccountSetupBasics.java b/src/com/android/email/activity/setup/AccountSetupBasics.java index 69e4612c9..2c342eea3 100644 --- a/src/com/android/email/activity/setup/AccountSetupBasics.java +++ b/src/com/android/email/activity/setup/AccountSetupBasics.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import java.io.Serializable; import java.net.URI; @@ -26,12 +26,12 @@ import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.EmailAddressValidator; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.Utility; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.EmailAddressValidator; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Utility; /** * Prompts the user for the email address and password. Also prompts for @@ -43,10 +43,10 @@ import com.fsck.k9.Utility; */ public class AccountSetupBasics extends Activity implements OnClickListener, TextWatcher { - private final static String EXTRA_ACCOUNT = "com.fsck.k9.AccountSetupBasics.account"; + private final static String EXTRA_ACCOUNT = "com.android.email.AccountSetupBasics.account"; private final static int DIALOG_NOTE = 1; private final static String STATE_KEY_PROVIDER = - "com.fsck.k9.AccountSetupBasics.provider"; + "com.android.email.AccountSetupBasics.provider"; private Preferences mPrefs; private EditText mEmailView; @@ -262,7 +262,7 @@ public class AccountSetupBasics extends Activity if (mDefaultView.isChecked()) { Preferences.getPreferences(this).setDefaultAccount(mAccount); } - k9.setServicesEnabled(this); + Email.setServicesEnabled(this); AccountSetupNames.actionSetNames(this, mAccount); finish(); } @@ -361,7 +361,7 @@ public class AccountSetupBasics extends Activity } } catch (Exception e) { - Log.e(k9.LOG_TAG, "Error while trying to load provider settings.", e); + Log.e(Email.LOG_TAG, "Error while trying to load provider settings.", e); } return null; } diff --git a/src/com/android/email/activity/setup/AccountSetupCheckSettings.java b/src/com/android/email/activity/setup/AccountSetupCheckSettings.java index 8162355ba..2f3dc06fd 100644 --- a/src/com/android/email/activity/setup/AccountSetupCheckSettings.java +++ b/src/com/android/email/activity/setup/AccountSetupCheckSettings.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; @@ -17,14 +17,14 @@ import android.widget.Button; import android.widget.ProgressBar; import android.widget.TextView; -import com.fsck.k9.Account; -import com.fsck.k9.R; -import com.fsck.k9.mail.AuthenticationFailedException; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.Transport; -import com.fsck.k9.mail.CertificateValidationException; -import com.fsck.k9.mail.store.TrustManagerFactory; +import com.android.email.Account; +import com.android.email.R; +import com.android.email.mail.AuthenticationFailedException; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Store; +import com.android.email.mail.Transport; +import com.android.email.mail.CertificateValidationException; +import com.android.email.mail.store.TrustManagerFactory; /** * Checks the given settings to make sure that they can be used to send and diff --git a/src/com/android/email/activity/setup/AccountSetupComposition.java b/src/com/android/email/activity/setup/AccountSetupComposition.java index f872fb193..080267c24 100644 --- a/src/com/android/email/activity/setup/AccountSetupComposition.java +++ b/src/com/android/email/activity/setup/AccountSetupComposition.java @@ -1,4 +1,4 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import android.app.Activity; import android.content.Intent; @@ -13,11 +13,11 @@ import android.widget.AdapterView; import android.widget.EditText; import android.widget.TextView; -import com.fsck.k9.Account; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.k9; -import com.fsck.k9.Utility; +import com.android.email.Account; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Email; +import com.android.email.Utility; public class AccountSetupComposition extends Activity { diff --git a/src/com/android/email/activity/setup/AccountSetupIncoming.java b/src/com/android/email/activity/setup/AccountSetupIncoming.java index 919ef1caf..e1fd36a41 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncoming.java +++ b/src/com/android/email/activity/setup/AccountSetupIncoming.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import java.net.URI; import java.net.URISyntaxException; @@ -19,10 +19,10 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; -import com.fsck.k9.Account; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.Utility; +import com.android.email.Account; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Utility; public class AccountSetupIncoming extends Activity implements OnClickListener { private static final String EXTRA_ACCOUNT = "account"; diff --git a/src/com/android/email/activity/setup/AccountSetupNames.java b/src/com/android/email/activity/setup/AccountSetupNames.java index 65706aaba..5ff61a22f 100644 --- a/src/com/android/email/activity/setup/AccountSetupNames.java +++ b/src/com/android/email/activity/setup/AccountSetupNames.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import android.app.Activity; import android.content.Context; @@ -14,12 +14,12 @@ import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.Utility; -import com.fsck.k9.activity.FolderMessageList; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Utility; +import com.android.email.activity.FolderMessageList; public class AccountSetupNames extends Activity implements OnClickListener { private static final String EXTRA_ACCOUNT = "account"; @@ -89,7 +89,7 @@ public class AccountSetupNames extends Activity implements OnClickListener { } mAccount.setName(mName.getText().toString()); mAccount.save(Preferences.getPreferences(this)); - FolderMessageList.actionHandleAccount(this, mAccount, k9.INBOX); + FolderMessageList.actionHandleAccount(this, mAccount, Email.INBOX); finish(); } diff --git a/src/com/android/email/activity/setup/AccountSetupOptions.java b/src/com/android/email/activity/setup/AccountSetupOptions.java index e1c24e943..70bf5512c 100644 --- a/src/com/android/email/activity/setup/AccountSetupOptions.java +++ b/src/com/android/email/activity/setup/AccountSetupOptions.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import android.app.Activity; import android.content.Context; @@ -11,10 +11,10 @@ import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.Spinner; -import com.fsck.k9.Account; -import com.fsck.k9.k9; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.Preferences; +import com.android.email.R; public class AccountSetupOptions extends Activity implements OnClickListener { private static final String EXTRA_ACCOUNT = "account"; @@ -115,7 +115,7 @@ public class AccountSetupOptions extends Activity implements OnClickListener { if (mDefaultView.isChecked()) { Preferences.getPreferences(this).setDefaultAccount(mAccount); } - k9.setServicesEnabled(this); + Email.setServicesEnabled(this); AccountSetupNames.actionSetNames(this, mAccount); finish(); } diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoing.java b/src/com/android/email/activity/setup/AccountSetupOutgoing.java index 6ddaf36dc..c37bf5476 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoing.java +++ b/src/com/android/email/activity/setup/AccountSetupOutgoing.java @@ -1,5 +1,5 @@ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import java.net.URI; import java.net.URISyntaxException; @@ -23,10 +23,10 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.CompoundButton.OnCheckedChangeListener; -import com.fsck.k9.Account; -import com.fsck.k9.Preferences; -import com.fsck.k9.R; -import com.fsck.k9.Utility; +import com.android.email.Account; +import com.android.email.Preferences; +import com.android.email.R; +import com.android.email.Utility; public class AccountSetupOutgoing extends Activity implements OnClickListener, OnCheckedChangeListener { diff --git a/src/com/android/email/activity/setup/SpinnerOption.java b/src/com/android/email/activity/setup/SpinnerOption.java index f97a95249..14067b8f8 100644 --- a/src/com/android/email/activity/setup/SpinnerOption.java +++ b/src/com/android/email/activity/setup/SpinnerOption.java @@ -2,7 +2,7 @@ * */ -package com.fsck.k9.activity.setup; +package com.android.email.activity.setup; import android.widget.Spinner; diff --git a/src/com/android/email/codec/binary/Base64.java b/src/com/android/email/codec/binary/Base64.java index ba5b03126..9f6b74d69 100644 --- a/src/com/android/email/codec/binary/Base64.java +++ b/src/com/android/email/codec/binary/Base64.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.fsck.k9.codec.binary; +package com.android.email.codec.binary; import org.apache.commons.codec.BinaryDecoder; import org.apache.commons.codec.BinaryEncoder; diff --git a/src/com/android/email/codec/binary/Base64OutputStream.java b/src/com/android/email/codec/binary/Base64OutputStream.java index f812cd368..ba59c3c95 100644 --- a/src/com/android/email/codec/binary/Base64OutputStream.java +++ b/src/com/android/email/codec/binary/Base64OutputStream.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.fsck.k9.codec.binary; +package com.android.email.codec.binary; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/src/com/android/email/mail/Address.java b/src/com/android/email/mail/Address.java index 9b64631d8..f5a4ee450 100644 --- a/src/com/android/email/mail/Address.java +++ b/src/com/android/email/mail/Address.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -16,9 +16,9 @@ import org.apache.james.mime4j.field.address.parser.ParseException; import android.util.Config; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.Utility; -import com.fsck.k9.mail.internet.MimeUtility; +import com.android.email.Email; +import com.android.email.Utility; +import com.android.email.mail.internet.MimeUtility; public class Address { String mAddress; @@ -74,7 +74,7 @@ public class Address { Mailbox mailbox = (Mailbox)address; addresses.add(new Address(mailbox.getLocalPart() + "@" + mailbox.getDomain())); } else { - Log.e(k9.LOG_TAG, "Unknown address type from Mime4J: " + Log.e(Email.LOG_TAG, "Unknown address type from Mime4J: " + address.getClass().toString()); } diff --git a/src/com/android/email/mail/AuthenticationFailedException.java b/src/com/android/email/mail/AuthenticationFailedException.java index 006063a14..dc79f6c79 100644 --- a/src/com/android/email/mail/AuthenticationFailedException.java +++ b/src/com/android/email/mail/AuthenticationFailedException.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public class AuthenticationFailedException extends MessagingException { public static final long serialVersionUID = -1; diff --git a/src/com/android/email/mail/Body.java b/src/com/android/email/mail/Body.java index 7deb2a1eb..6dacfa5c1 100644 --- a/src/com/android/email/mail/Body.java +++ b/src/com/android/email/mail/Body.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.io.IOException; import java.io.InputStream; diff --git a/src/com/android/email/mail/BodyPart.java b/src/com/android/email/mail/BodyPart.java index e5f9375e6..ff7c8d62b 100644 --- a/src/com/android/email/mail/BodyPart.java +++ b/src/com/android/email/mail/BodyPart.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public abstract class BodyPart implements Part { protected Multipart mParent; diff --git a/src/com/android/email/mail/CertificateValidationException.java b/src/com/android/email/mail/CertificateValidationException.java index ed35cf8ac..17bba50cc 100644 --- a/src/com/android/email/mail/CertificateValidationException.java +++ b/src/com/android/email/mail/CertificateValidationException.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public class CertificateValidationException extends MessagingException { public static final long serialVersionUID = -1; diff --git a/src/com/android/email/mail/FetchProfile.java b/src/com/android/email/mail/FetchProfile.java index 95bc44712..558fec8bc 100644 --- a/src/com/android/email/mail/FetchProfile.java +++ b/src/com/android/email/mail/FetchProfile.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.util.ArrayList; diff --git a/src/com/android/email/mail/Flag.java b/src/com/android/email/mail/Flag.java index ec898a700..71f299645 100644 --- a/src/com/android/email/mail/Flag.java +++ b/src/com/android/email/mail/Flag.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; /** * Flags that can be applied to Messages. diff --git a/src/com/android/email/mail/Folder.java b/src/com/android/email/mail/Folder.java index 037f1b36f..853efc4ab 100644 --- a/src/com/android/email/mail/Folder.java +++ b/src/com/android/email/mail/Folder.java @@ -1,4 +1,4 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public abstract class Folder { diff --git a/src/com/android/email/mail/Message.java b/src/com/android/email/mail/Message.java index 58f036304..5f13c33ff 100644 --- a/src/com/android/email/mail/Message.java +++ b/src/com/android/email/mail/Message.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.util.Date; import java.util.HashSet; diff --git a/src/com/android/email/mail/MessageDateComparator.java b/src/com/android/email/mail/MessageDateComparator.java index 2bde7af0b..67b273aa3 100644 --- a/src/com/android/email/mail/MessageDateComparator.java +++ b/src/com/android/email/mail/MessageDateComparator.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.util.Comparator; diff --git a/src/com/android/email/mail/MessageRetrievalListener.java b/src/com/android/email/mail/MessageRetrievalListener.java index 2a1446211..fd070521d 100644 --- a/src/com/android/email/mail/MessageRetrievalListener.java +++ b/src/com/android/email/mail/MessageRetrievalListener.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public interface MessageRetrievalListener { public void messageStarted(String uid, int number, int ofTotal); diff --git a/src/com/android/email/mail/MessagingException.java b/src/com/android/email/mail/MessagingException.java index 7e0a0d263..8ccd8473e 100644 --- a/src/com/android/email/mail/MessagingException.java +++ b/src/com/android/email/mail/MessagingException.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public class MessagingException extends Exception { public static final long serialVersionUID = -1; diff --git a/src/com/android/email/mail/Multipart.java b/src/com/android/email/mail/Multipart.java index 787f5b382..1e59a73b0 100644 --- a/src/com/android/email/mail/Multipart.java +++ b/src/com/android/email/mail/Multipart.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.util.ArrayList; diff --git a/src/com/android/email/mail/NoSuchProviderException.java b/src/com/android/email/mail/NoSuchProviderException.java index 5eb9029d0..68d663a44 100644 --- a/src/com/android/email/mail/NoSuchProviderException.java +++ b/src/com/android/email/mail/NoSuchProviderException.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; public class NoSuchProviderException extends MessagingException { public static final long serialVersionUID = -1; diff --git a/src/com/android/email/mail/Part.java b/src/com/android/email/mail/Part.java index 2d06744ed..45c38c223 100644 --- a/src/com/android/email/mail/Part.java +++ b/src/com/android/email/mail/Part.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.io.IOException; import java.io.OutputStream; diff --git a/src/com/android/email/mail/Store.java b/src/com/android/email/mail/Store.java index 87157ed58..18afe5781 100644 --- a/src/com/android/email/mail/Store.java +++ b/src/com/android/email/mail/Store.java @@ -1,14 +1,14 @@ -package com.fsck.k9.mail; +package com.android.email.mail; import java.util.HashMap; import android.app.Application; -import com.fsck.k9.mail.store.ImapStore; -import com.fsck.k9.mail.store.LocalStore; -import com.fsck.k9.mail.store.Pop3Store; -import com.fsck.k9.mail.store.WebDavStore; +import com.android.email.mail.store.ImapStore; +import com.android.email.mail.store.LocalStore; +import com.android.email.mail.store.Pop3Store; +import com.android.email.mail.store.WebDavStore; /** * Store is the access point for an email message store. It's location can be diff --git a/src/com/android/email/mail/Transport.java b/src/com/android/email/mail/Transport.java index 8f55cad8d..2aba0991a 100644 --- a/src/com/android/email/mail/Transport.java +++ b/src/com/android/email/mail/Transport.java @@ -1,8 +1,8 @@ -package com.fsck.k9.mail; +package com.android.email.mail; -import com.fsck.k9.mail.transport.SmtpTransport; -import com.fsck.k9.mail.transport.WebDavTransport; +import com.android.email.mail.transport.SmtpTransport; +import com.android.email.mail.transport.WebDavTransport; public abstract class Transport { protected static final int SOCKET_CONNECT_TIMEOUT = 10000; diff --git a/src/com/android/email/mail/internet/BinaryTempFileBody.java b/src/com/android/email/mail/internet/BinaryTempFileBody.java index 771c17c5e..76b120d5b 100644 --- a/src/com/android/email/mail/internet/BinaryTempFileBody.java +++ b/src/com/android/email/mail/internet/BinaryTempFileBody.java @@ -1,4 +1,4 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.File; import java.io.FileInputStream; @@ -13,10 +13,10 @@ import org.apache.commons.io.IOUtils; import android.util.Config; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.codec.binary.Base64OutputStream; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.MessagingException; +import com.android.email.Email; +import com.android.email.codec.binary.Base64OutputStream; +import com.android.email.mail.Body; +import com.android.email.mail.MessagingException; /** * A Body that is backed by a temp file. The Body exposes a getOutputStream method that allows diff --git a/src/com/android/email/mail/internet/MimeBodyPart.java b/src/com/android/email/mail/internet/MimeBodyPart.java index 4504a99a8..f41caedde 100644 --- a/src/com/android/email/mail/internet/MimeBodyPart.java +++ b/src/com/android/email/mail/internet/MimeBodyPart.java @@ -1,14 +1,14 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.BodyPart; -import com.fsck.k9.mail.MessagingException; +import com.android.email.mail.Body; +import com.android.email.mail.BodyPart; +import com.android.email.mail.MessagingException; /** * TODO this is a close approximation of Message, need to update along with @@ -60,8 +60,8 @@ public class MimeBodyPart extends BodyPart { public void setBody(Body body) throws MessagingException { this.mBody = body; - if (body instanceof com.fsck.k9.mail.Multipart) { - com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); + if (body instanceof com.android.email.mail.Multipart) { + com.android.email.mail.Multipart multipart = ((com.android.email.mail.Multipart)body); multipart.setParent(this); setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType()); } diff --git a/src/com/android/email/mail/internet/MimeHeader.java b/src/com/android/email/mail/internet/MimeHeader.java index 35b50c357..7a233d054 100644 --- a/src/com/android/email/mail/internet/MimeHeader.java +++ b/src/com/android/email/mail/internet/MimeHeader.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.BufferedWriter; import java.io.IOException; @@ -7,8 +7,8 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.util.ArrayList; -import com.fsck.k9.Utility; -import com.fsck.k9.mail.MessagingException; +import com.android.email.Utility; +import com.android.email.mail.MessagingException; public class MimeHeader { /** diff --git a/src/com/android/email/mail/internet/MimeMessage.java b/src/com/android/email/mail/internet/MimeMessage.java index 41d32fd5f..a1a474f15 100644 --- a/src/com/android/email/mail/internet/MimeMessage.java +++ b/src/com/android/email/mail/internet/MimeMessage.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.BufferedWriter; import java.io.IOException; @@ -17,12 +17,12 @@ import org.apache.james.mime4j.MimeStreamParser; import org.apache.james.mime4j.field.DateTimeField; import org.apache.james.mime4j.field.Field; -import com.fsck.k9.mail.Address; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.BodyPart; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Part; +import com.android.email.mail.Address; +import com.android.email.mail.Body; +import com.android.email.mail.BodyPart; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Part; /** * An implementation of Message that stores all of it's metadata in RFC 822 and @@ -251,8 +251,8 @@ public class MimeMessage extends Message { public void setBody(Body body) throws MessagingException { this.mBody = body; - if (body instanceof com.fsck.k9.mail.Multipart) { - com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); + if (body instanceof com.android.email.mail.Multipart) { + com.android.email.mail.Multipart multipart = ((com.android.email.mail.Multipart)body); multipart.setParent(this); setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType()); setHeader("MIME-Version", "1.0"); diff --git a/src/com/android/email/mail/internet/MimeMultipart.java b/src/com/android/email/mail/internet/MimeMultipart.java index 6db58a5d8..47fe0d82d 100644 --- a/src/com/android/email/mail/internet/MimeMultipart.java +++ b/src/com/android/email/mail/internet/MimeMultipart.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.BufferedWriter; import java.io.IOException; @@ -7,9 +7,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; -import com.fsck.k9.mail.BodyPart; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Multipart; +import com.android.email.mail.BodyPart; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Multipart; public class MimeMultipart extends Multipart { protected String mPreamble; diff --git a/src/com/android/email/mail/internet/MimeUtility.java b/src/com/android/email/mail/internet/MimeUtility.java index 855da6102..9ee711014 100644 --- a/src/com/android/email/mail/internet/MimeUtility.java +++ b/src/com/android/email/mail/internet/MimeUtility.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -17,13 +17,13 @@ import org.apache.james.mime4j.decoder.QuotedPrintableInputStream; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.BodyPart; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Multipart; -import com.fsck.k9.mail.Part; +import com.android.email.Email; +import com.android.email.mail.Body; +import com.android.email.mail.BodyPart; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Multipart; +import com.android.email.mail.Part; public class MimeUtility { @@ -183,7 +183,7 @@ public class MimeUtility { * If we are not able to process the body there's nothing we can do about it. Return * null and let the upper layers handle the missing content. */ - Log.e(k9.LOG_TAG, "Unable to getTextFromPart", e); + Log.e(Email.LOG_TAG, "Unable to getTextFromPart", e); } return null; } diff --git a/src/com/android/email/mail/internet/TextBody.java b/src/com/android/email/mail/internet/TextBody.java index 0b85ba115..c1755922c 100644 --- a/src/com/android/email/mail/internet/TextBody.java +++ b/src/com/android/email/mail/internet/TextBody.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.internet; +package com.android.email.mail.internet; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -8,9 +8,9 @@ import java.io.OutputStream; import java.io.UnsupportedEncodingException; -import com.fsck.k9.codec.binary.Base64; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.MessagingException; +import com.android.email.codec.binary.Base64; +import com.android.email.mail.Body; +import com.android.email.mail.MessagingException; public class TextBody implements Body { String mBody; diff --git a/src/com/android/email/mail/store/ImapResponseParser.java b/src/com/android/email/mail/store/ImapResponseParser.java index 6a759e53c..e51742295 100644 --- a/src/com/android/email/mail/store/ImapResponseParser.java +++ b/src/com/android/email/mail/store/ImapResponseParser.java @@ -2,7 +2,7 @@ * */ -package com.fsck.k9.mail.store; +package com.android.email.mail.store; import java.io.IOException; import java.io.InputStream; @@ -14,10 +14,10 @@ import java.util.Date; import android.util.Config; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.FixedLengthInputStream; -import com.fsck.k9.PeekableInputStream; -import com.fsck.k9.mail.MessagingException; +import com.android.email.Email; +import com.android.email.FixedLengthInputStream; +import com.android.email.PeekableInputStream; +import com.android.email.mail.MessagingException; public class ImapResponseParser { SimpleDateFormat mDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss Z"); @@ -55,8 +55,8 @@ public class ImapResponseParser { readTokens(response); } if (Config.LOGD) { - if (k9.DEBUG) { - Log.d(k9.LOG_TAG, "<<< " + response.toString()); + if (Email.DEBUG) { + Log.d(Email.LOG_TAG, "<<< " + response.toString()); } } return response; diff --git a/src/com/android/email/mail/store/ImapStore.java b/src/com/android/email/mail/store/ImapStore.java index 7c5f88508..7312bbc8e 100644 --- a/src/com/android/email/mail/store/ImapStore.java +++ b/src/com/android/email/mail/store/ImapStore.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.store; +package com.android.email.mail.store; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -31,28 +31,28 @@ import javax.net.ssl.SSLException; import android.util.Config; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.PeekableInputStream; -import com.fsck.k9.Utility; -import com.fsck.k9.mail.AuthenticationFailedException; -import com.fsck.k9.mail.FetchProfile; -import com.fsck.k9.mail.Flag; -import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessageRetrievalListener; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Part; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.CertificateValidationException; -import com.fsck.k9.mail.internet.MimeBodyPart; -import com.fsck.k9.mail.internet.MimeHeader; -import com.fsck.k9.mail.internet.MimeMessage; -import com.fsck.k9.mail.internet.MimeMultipart; -import com.fsck.k9.mail.internet.MimeUtility; -import com.fsck.k9.mail.store.ImapResponseParser.ImapList; -import com.fsck.k9.mail.store.ImapResponseParser.ImapResponse; -import com.fsck.k9.mail.transport.CountingOutputStream; -import com.fsck.k9.mail.transport.EOLConvertingOutputStream; +import com.android.email.Email; +import com.android.email.PeekableInputStream; +import com.android.email.Utility; +import com.android.email.mail.AuthenticationFailedException; +import com.android.email.mail.FetchProfile; +import com.android.email.mail.Flag; +import com.android.email.mail.Folder; +import com.android.email.mail.Message; +import com.android.email.mail.MessageRetrievalListener; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Part; +import com.android.email.mail.Store; +import com.android.email.mail.CertificateValidationException; +import com.android.email.mail.internet.MimeBodyPart; +import com.android.email.mail.internet.MimeHeader; +import com.android.email.mail.internet.MimeMessage; +import com.android.email.mail.internet.MimeMultipart; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.store.ImapResponseParser.ImapList; +import com.android.email.mail.store.ImapResponseParser.ImapResponse; +import com.android.email.mail.transport.CountingOutputStream; +import com.android.email.mail.transport.EOLConvertingOutputStream; import com.beetstra.jutf7.CharsetProvider; /** @@ -192,7 +192,7 @@ public class ImapStore extends Store { if(mPathDelimeter == null){ mPathDelimeter = response.getString(2); } - if (folder.equalsIgnoreCase(k9.INBOX)) { + if (folder.equalsIgnoreCase(Email.INBOX)) { continue; }else{ if(mPathPrefix.length() > 0){ @@ -314,7 +314,7 @@ public class ImapStore extends Store { public String getPrefixedName() { String prefixedName = ""; - if(mPathPrefix.length() > 0 && !mName.equalsIgnoreCase(k9.INBOX)){ + if(mPathPrefix.length() > 0 && !mName.equalsIgnoreCase(Email.INBOX)){ prefixedName += mPathPrefix + mPathDelimeter; } @@ -742,7 +742,7 @@ public class ImapStore extends Store { } catch (MessagingException e) { if (Config.LOGV) { - Log.v(k9.LOG_TAG, "Error handling message", e); + Log.v(Email.LOG_TAG, "Error handling message", e); } message.setBody(null); } @@ -1226,12 +1226,12 @@ public class ImapStore extends Store { mOut.write('\n'); mOut.flush(); if (Config.LOGD) { - if (k9.DEBUG) { - if (sensitive && !k9.DEBUG_SENSITIVE) { - Log.d(k9.LOG_TAG, ">>> " + if (Email.DEBUG) { + if (sensitive && !Email.DEBUG_SENSITIVE) { + Log.d(Email.LOG_TAG, ">>> " + "[Command Hidden, Enable Sensitive Debug Logging To Show]"); } else { - Log.d(k9.LOG_TAG, ">>> " + commandToSend); + Log.d(Email.LOG_TAG, ">>> " + commandToSend); } } } diff --git a/src/com/android/email/mail/store/LocalStore.java b/src/com/android/email/mail/store/LocalStore.java index 1676cc622..2b37bc493 100644 --- a/src/com/android/email/mail/store/LocalStore.java +++ b/src/com/android/email/mail/store/LocalStore.java @@ -1,5 +1,5 @@ -package com.fsck.k9.mail.store; +package com.android.email.mail.store; import java.io.ByteArrayInputStream; import java.io.File; @@ -25,27 +25,27 @@ import android.net.Uri; import android.util.Config; import android.util.Log; -import com.fsck.k9.k9; -import com.fsck.k9.Utility; -import com.fsck.k9.codec.binary.Base64OutputStream; -import com.fsck.k9.mail.Address; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.FetchProfile; -import com.fsck.k9.mail.Flag; -import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Message; -import com.fsck.k9.mail.MessageRetrievalListener; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Part; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.Message.RecipientType; -import com.fsck.k9.mail.internet.MimeBodyPart; -import com.fsck.k9.mail.internet.MimeHeader; -import com.fsck.k9.mail.internet.MimeMessage; -import com.fsck.k9.mail.internet.MimeMultipart; -import com.fsck.k9.mail.internet.MimeUtility; -import com.fsck.k9.mail.internet.TextBody; -import com.fsck.k9.provider.AttachmentProvider; +import com.android.email.Email; +import com.android.email.Utility; +import com.android.email.codec.binary.Base64OutputStream; +import com.android.email.mail.Address; +import com.android.email.mail.Body; +import com.android.email.mail.FetchProfile; +import com.android.email.mail.Flag; +import com.android.email.mail.Folder; +import com.android.email.mail.Message; +import com.android.email.mail.MessageRetrievalListener; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Part; +import com.android.email.mail.Store; +import com.android.email.mail.Message.RecipientType; +import com.android.email.mail.internet.MimeBodyPart; +import com.android.email.mail.internet.MimeHeader; +import com.android.email.mail.internet.MimeMessage; +import com.android.email.mail.internet.MimeMultipart; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.internet.TextBody; +import com.android.email.provider.AttachmentProvider; /** *
@@ -98,7 +98,7 @@ public class LocalStore extends Store {
 
             if (mDb.getVersion() < 18) {
                 if (Config.LOGV) {
-                    Log.v(k9.LOG_TAG, String.format("Upgrading database from %d to %d", mDb
+                    Log.v(Email.LOG_TAG, String.format("Upgrading database from %d to %d", mDb
                             .getVersion(), 18));
                 }
                 mDb.execSQL("DROP TABLE IF EXISTS folders");
@@ -242,7 +242,7 @@ public class LocalStore extends Store {
     }
 
     public void resetVisibleLimits() {
-        resetVisibleLimits(k9.DEFAULT_VISIBLE_LIMIT);
+        resetVisibleLimits(Email.DEFAULT_VISIBLE_LIMIT);
     }
 
     public void resetVisibleLimits(int visibleLimit) {
@@ -404,7 +404,7 @@ public class LocalStore extends Store {
             }
             mDb.execSQL("INSERT INTO folders (name, visible_limit) VALUES (?, ?)", new Object[] {
                 mName,
-                k9.DEFAULT_VISIBLE_LIMIT 
+                Email.DEFAULT_VISIBLE_LIMIT 
             });
             return true;
         }
@@ -1141,7 +1141,7 @@ public class LocalStore extends Store {
                 }
             }
             catch (MessagingException me) {
-                Log.e(k9.LOG_TAG, "Unable to update LocalStore unread message count",
+                Log.e(Email.LOG_TAG, "Unable to update LocalStore unread message count",
                         me);
                 throw new RuntimeException(me);
             }
diff --git a/src/com/android/email/mail/store/Pop3Store.java b/src/com/android/email/mail/store/Pop3Store.java
index 37a18e9dc..4d28cda2c 100644
--- a/src/com/android/email/mail/store/Pop3Store.java
+++ b/src/com/android/email/mail/store/Pop3Store.java
@@ -1,5 +1,5 @@
 
-package com.fsck.k9.mail.store;
+package com.android.email.mail.store;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -24,19 +24,19 @@ import javax.net.ssl.SSLException;
 import android.util.Config;
 import android.util.Log;
 
-import com.fsck.k9.k9;
-import com.fsck.k9.Utility;
-import com.fsck.k9.mail.AuthenticationFailedException;
-import com.fsck.k9.mail.FetchProfile;
-import com.fsck.k9.mail.Flag;
-import com.fsck.k9.mail.Folder;
-import com.fsck.k9.mail.Message;
-import com.fsck.k9.mail.MessageRetrievalListener;
-import com.fsck.k9.mail.MessagingException;
-import com.fsck.k9.mail.Store;
-import com.fsck.k9.mail.CertificateValidationException;
-import com.fsck.k9.mail.Folder.OpenMode;
-import com.fsck.k9.mail.internet.MimeMessage;
+import com.android.email.Email;
+import com.android.email.Utility;
+import com.android.email.mail.AuthenticationFailedException;
+import com.android.email.mail.FetchProfile;
+import com.android.email.mail.Flag;
+import com.android.email.mail.Folder;
+import com.android.email.mail.Message;
+import com.android.email.mail.MessageRetrievalListener;
+import com.android.email.mail.MessagingException;
+import com.android.email.mail.Store;
+import com.android.email.mail.CertificateValidationException;
+import com.android.email.mail.Folder.OpenMode;
+import com.android.email.mail.internet.MimeMessage;
 
 public class Pop3Store extends Store {
     public static final int CONNECTION_SECURITY_NONE = 0;
@@ -736,8 +736,8 @@ public class Pop3Store extends Store {
             } while ((d = mIn.read()) != -1);
             String ret = sb.toString();
             if (Config.LOGD) {
-                if (k9.DEBUG) {
-                    Log.d(k9.LOG_TAG, "<<< " + ret);
+                if (Email.DEBUG) {
+                    Log.d(Email.LOG_TAG, "<<< " + ret);
                 }
             }
             return ret;
@@ -745,8 +745,8 @@ public class Pop3Store extends Store {
 
         private void writeLine(String s) throws IOException {
             if (Config.LOGD) {
-                if (k9.DEBUG) {
-                    Log.d(k9.LOG_TAG, ">>> " + s);
+                if (Email.DEBUG) {
+                    Log.d(Email.LOG_TAG, ">>> " + s);
                 }
             }
             mOut.write(s.getBytes());
diff --git a/src/com/android/email/mail/store/TrustManagerFactory.java b/src/com/android/email/mail/store/TrustManagerFactory.java
index 70add0670..acd61750d 100644
--- a/src/com/android/email/mail/store/TrustManagerFactory.java
+++ b/src/com/android/email/mail/store/TrustManagerFactory.java
@@ -1,5 +1,5 @@
 
-package com.fsck.k9.mail.store;
+package com.android.email.mail.store;
 
 import android.util.Log;
 import android.app.Application;
@@ -18,7 +18,7 @@ import java.security.cert.CertificateException;
 import javax.net.ssl.X509TrustManager;
 import javax.net.ssl.TrustManager;
 
-import com.fsck.k9.k9;
+import com.android.email.Email;
 
 public final class TrustManagerFactory {
     private static final String LOG_TAG = "TrustManagerFactory";
@@ -104,7 +104,7 @@ public final class TrustManagerFactory {
     static {
         try {
             javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance("X509");
-            Application app = k9.app;
+            Application app = Email.app;
             keyStoreFile = new File(app.getDir("KeyStore", Context.MODE_PRIVATE) + File.separator + "KeyStore.bks");
             keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
 			//TODO: read store from disk.
diff --git a/src/com/android/email/mail/store/WebDavStore.java b/src/com/android/email/mail/store/WebDavStore.java
index 7000600fe..fea3f821d 100644
--- a/src/com/android/email/mail/store/WebDavStore.java
+++ b/src/com/android/email/mail/store/WebDavStore.java
@@ -1,4 +1,4 @@
-package com.fsck.k9.mail.store;
+package com.android.email.mail.store;
 
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
@@ -23,17 +23,17 @@ import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import com.fsck.k9.k9;
-import com.fsck.k9.mail.FetchProfile;
-import com.fsck.k9.mail.Flag;
-import com.fsck.k9.mail.Folder;
-import com.fsck.k9.mail.Message;
-import com.fsck.k9.mail.MessageRetrievalListener;
-import com.fsck.k9.mail.MessagingException;
-import com.fsck.k9.mail.Store;
-import com.fsck.k9.mail.internet.MimeBodyPart;
-import com.fsck.k9.mail.internet.MimeMessage;
-import com.fsck.k9.mail.internet.TextBody;
+import com.android.email.Email;
+import com.android.email.mail.FetchProfile;
+import com.android.email.mail.Flag;
+import com.android.email.mail.Folder;
+import com.android.email.mail.Message;
+import com.android.email.mail.MessageRetrievalListener;
+import com.android.email.mail.MessagingException;
+import com.android.email.mail.Store;
+import com.android.email.mail.internet.MimeBodyPart;
+import com.android.email.mail.internet.MimeMessage;
+import com.android.email.mail.internet.TextBody;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpEntity;
@@ -150,7 +150,7 @@ public class WebDavStore extends Store {
 
     @Override
     public void checkSettings() throws MessagingException {
-        Log.e(k9.LOG_TAG, "WebDavStore.checkSettings() not implemented");
+        Log.e(Email.LOG_TAG, "WebDavStore.checkSettings() not implemented");
     }
 
     @Override
@@ -220,7 +220,7 @@ public class WebDavStore extends Store {
                         String fullPathName = "";
                         WebDavFolder wdFolder;
                         
-                        if (folderName.equalsIgnoreCase(k9.INBOX)) {
+                        if (folderName.equalsIgnoreCase(Email.INBOX)) {
                             folderName = "INBOX";
                         } else {
                             for (int j = 5, count = urlParts.length; j < count; j++) {
@@ -240,15 +240,15 @@ public class WebDavStore extends Store {
                         //folderList.add(getFolder(java.net.URLDecoder.decode(folderName, "UTF-8")));
                     }
                 } catch (SAXException se) {
-                    Log.e(k9.LOG_TAG, "Error with SAXParser " + se);
+                    Log.e(Email.LOG_TAG, "Error with SAXParser " + se);
                 } catch (ParserConfigurationException pce) {
-                    Log.e(k9.LOG_TAG, "Error with SAXParser " + pce);
+                    Log.e(Email.LOG_TAG, "Error with SAXParser " + pce);
                 }
             }
         } catch (UnsupportedEncodingException uee) {
-            Log.e(k9.LOG_TAG, "Error with encoding " + uee);
+            Log.e(Email.LOG_TAG, "Error with encoding " + uee);
         } catch (IOException ioe) {
-            Log.e(k9.LOG_TAG, "IOException " + ioe);
+            Log.e(Email.LOG_TAG, "IOException " + ioe);
         } 
 
         return folderList.toArray(new WebDavFolder[] {});
@@ -412,7 +412,7 @@ public class WebDavStore extends Store {
         try {
             this.mAuthCookies = doAuthentication(this.mUsername, this.mPassword, this.mUrl);
         } catch (IOException ioe) {
-            Log.e(k9.LOG_TAG, "Error during authentication: " + ioe);
+            Log.e(Email.LOG_TAG, "Error during authentication: " + ioe);
             this.mAuthCookies = null;
         }
         
@@ -514,7 +514,7 @@ public class WebDavStore extends Store {
             }
             
         } catch (UnsupportedEncodingException uee) {
-            Log.e(k9.LOG_TAG, "Error encoding POST data for authencation");
+            Log.e(Email.LOG_TAG, "Error encoding POST data for authencation");
         }
         return cookies;
     }
@@ -550,7 +550,7 @@ public class WebDavStore extends Store {
             try {
                 encodedName = java.net.URLEncoder.encode(name, "UTF-8");
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException URLEncoding folder name, skipping encoded");
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException URLEncoding folder name, skipping encoded");
                 encodedName = name;
             }
 
@@ -647,15 +647,15 @@ public class WebDavStore extends Store {
 
                         istream.close();
                     } catch (SAXException se) {
-                        Log.e(k9.LOG_TAG, "SAXException in getMessageCount " + se);
+                        Log.e(Email.LOG_TAG, "SAXException in getMessageCount " + se);
                     } catch (ParserConfigurationException pce) {
-                        Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessageCount " + pce);
+                        Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessageCount " + pce);
                     }
                 }
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException in getMessageCount() " + ioe);
+                Log.e(Email.LOG_TAG, "IOException in getMessageCount() " + ioe);
             }
             return messageCount;
         }
@@ -807,15 +807,15 @@ public class WebDavStore extends Store {
                             }
                         }
                     } catch (SAXException se) {
-                        Log.e(k9.LOG_TAG, "SAXException in getMessages() " + se);
+                        Log.e(Email.LOG_TAG, "SAXException in getMessages() " + se);
                     } catch (ParserConfigurationException pce) {
-                        Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
+                        Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
                     }
                 }
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                Log.e(Email.LOG_TAG, "IOException: " + ioe);
             }
 
             return messages.toArray(new Message[] {});
@@ -911,15 +911,15 @@ public class WebDavStore extends Store {
                         dataset = myHandler.getDataSet();
                         uidToUrl = dataset.getUidToUrl();
                     } catch (SAXException se) {
-                        Log.e(k9.LOG_TAG, "SAXException in getMessages() " + se);
+                        Log.e(Email.LOG_TAG, "SAXException in getMessages() " + se);
                     } catch (ParserConfigurationException pce) {
-                        Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
+                        Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
                     }
                 }
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                Log.e(Email.LOG_TAG, "IOException: " + ioe);
             }
 
             return uidToUrl;
@@ -1047,11 +1047,11 @@ public class WebDavStore extends Store {
                         }
                 
                     } catch (IllegalArgumentException iae) {
-                        Log.e(k9.LOG_TAG, "IllegalArgumentException caught " + iae);
+                        Log.e(Email.LOG_TAG, "IllegalArgumentException caught " + iae);
                     } catch (URISyntaxException use) {
-                        Log.e(k9.LOG_TAG, "URISyntaxException caught " + use);
+                        Log.e(Email.LOG_TAG, "URISyntaxException caught " + use);
                     } catch (IOException ioe) {
-                        Log.e(k9.LOG_TAG, "Non-success response code loading message, response code was " + statusCode);
+                        Log.e(Email.LOG_TAG, "Non-success response code loading message, response code was " + statusCode);
                     }
                 }
 
@@ -1140,15 +1140,15 @@ public class WebDavStore extends Store {
                         dataset = myHandler.getDataSet();
                         uidToReadStatus = dataset.getUidToRead();
                     } catch (SAXException se) {
-                        Log.e(k9.LOG_TAG, "SAXException in fetch() " + se);
+                        Log.e(Email.LOG_TAG, "SAXException in fetch() " + se);
                     } catch (ParserConfigurationException pce) {
-                        Log.e(k9.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
+                        Log.e(Email.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
                     }
                 }
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                Log.e(Email.LOG_TAG, "IOException: " + ioe);
             }
 
             for (int i = 0, count = messages.length; i < count; i++) {
@@ -1247,15 +1247,15 @@ public class WebDavStore extends Store {
                         dataset = myHandler.getDataSet();
                         envelopes = dataset.getMessageEnvelopes();
                     } catch (SAXException se) {
-                        Log.e(k9.LOG_TAG, "SAXException in fetch() " + se);
+                        Log.e(Email.LOG_TAG, "SAXException in fetch() " + se);
                     } catch (ParserConfigurationException pce) {
-                        Log.e(k9.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
+                        Log.e(Email.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
                     }
                 }
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                Log.e(Email.LOG_TAG, "IOException: " + ioe);
             }
 
             int count = messages.length;
@@ -1349,9 +1349,9 @@ public class WebDavStore extends Store {
 
                 entity = response.getEntity();
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
             } catch (IOException ioe) {
-                Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                Log.e(Email.LOG_TAG, "IOException: " + ioe);
             }
         }
 
@@ -1380,9 +1380,9 @@ public class WebDavStore extends Store {
                         throw new IOException("Error deleting message url: "+urls[i]+" \nResponse Code: "+status_code);
                     }
                 } catch (UnsupportedEncodingException uee) {
-                    Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee);
+                    Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
                 } catch (IOException ioe) {
-                    Log.e(k9.LOG_TAG, "IOException: " + ioe);
+                    Log.e(Email.LOG_TAG, "IOException: " + ioe);
                 }
             }
         }
@@ -1440,9 +1440,9 @@ public class WebDavStore extends Store {
                 end = java.net.URLEncoder.encode(end, "UTF-8");
                 end = end.replaceAll("\\+", "%20");
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException caught in setUrl");
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException caught in setUrl");
             } catch (IllegalArgumentException iae) {
-                Log.e(k9.LOG_TAG, "IllegalArgumentException caught in setUrl");
+                Log.e(Email.LOG_TAG, "IllegalArgumentException caught in setUrl");
             }
 
             for (int i = 0; i < length - 1; i++) {
@@ -1646,7 +1646,7 @@ public class WebDavStore extends Store {
                     Date parsedDate = dfInput.parse(value);
                     tempDate = dfOutput.format(parsedDate);
                 } catch (java.text.ParseException pe) {
-                    Log.e(k9.LOG_TAG, "Error parsing date: "+ pe);
+                    Log.e(Email.LOG_TAG, "Error parsing date: "+ pe);
                 }
 
                 this.mEnvelope.addHeader("Date", tempDate);
@@ -1814,9 +1814,9 @@ public class WebDavStore extends Store {
                 end = java.net.URLEncoder.encode(end, "UTF-8");
                 end = end.replaceAll("\\+", "%20");
             } catch (UnsupportedEncodingException uee) {
-                Log.e(k9.LOG_TAG, "UnsupportedEncodingException caught in HttpGeneric(String uri)");
+                Log.e(Email.LOG_TAG, "UnsupportedEncodingException caught in HttpGeneric(String uri)");
             } catch (IllegalArgumentException iae) {
-                Log.e(k9.LOG_TAG, "IllegalArgumentException caught in HttpGeneric(String uri)");
+                Log.e(Email.LOG_TAG, "IllegalArgumentException caught in HttpGeneric(String uri)");
             }
 
             for (int i = 0; i < length - 1; i++) {
diff --git a/src/com/android/email/mail/transport/CountingOutputStream.java b/src/com/android/email/mail/transport/CountingOutputStream.java
index 51a786c8c..424aede5c 100644
--- a/src/com/android/email/mail/transport/CountingOutputStream.java
+++ b/src/com/android/email/mail/transport/CountingOutputStream.java
@@ -1,4 +1,4 @@
-package com.fsck.k9.mail.transport;
+package com.android.email.mail.transport;
 
 import java.io.IOException;
 import java.io.OutputStream;
diff --git a/src/com/android/email/mail/transport/EOLConvertingOutputStream.java b/src/com/android/email/mail/transport/EOLConvertingOutputStream.java
index 02d465615..719959a80 100644
--- a/src/com/android/email/mail/transport/EOLConvertingOutputStream.java
+++ b/src/com/android/email/mail/transport/EOLConvertingOutputStream.java
@@ -1,4 +1,4 @@
-package com.fsck.k9.mail.transport;
+package com.android.email.mail.transport;
 
 import java.io.FilterOutputStream;
 import java.io.IOException;
diff --git a/src/com/android/email/mail/transport/SmtpTransport.java b/src/com/android/email/mail/transport/SmtpTransport.java
index d02b27364..e5e704889 100644
--- a/src/com/android/email/mail/transport/SmtpTransport.java
+++ b/src/com/android/email/mail/transport/SmtpTransport.java
@@ -1,5 +1,5 @@
 
-package com.fsck.k9.mail.transport;
+package com.android.email.mail.transport;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -21,17 +21,17 @@ import javax.net.ssl.SSLException;
 import android.util.Config;
 import android.util.Log;
 
-import com.fsck.k9.k9;
-import com.fsck.k9.PeekableInputStream;
-import com.fsck.k9.codec.binary.Base64;
-import com.fsck.k9.mail.Address;
-import com.fsck.k9.mail.AuthenticationFailedException;
-import com.fsck.k9.mail.Message;
-import com.fsck.k9.mail.MessagingException;
-import com.fsck.k9.mail.Transport;
-import com.fsck.k9.mail.CertificateValidationException;
-import com.fsck.k9.mail.Message.RecipientType;
-import com.fsck.k9.mail.store.TrustManagerFactory;
+import com.android.email.Email;
+import com.android.email.PeekableInputStream;
+import com.android.email.codec.binary.Base64;
+import com.android.email.mail.Address;
+import com.android.email.mail.AuthenticationFailedException;
+import com.android.email.mail.Message;
+import com.android.email.mail.MessagingException;
+import com.android.email.mail.Transport;
+import com.android.email.mail.CertificateValidationException;
+import com.android.email.mail.Message.RecipientType;
+import com.android.email.mail.store.TrustManagerFactory;
 
 public class SmtpTransport extends Transport {
     public static final int CONNECTION_SECURITY_NONE = 0;
@@ -150,8 +150,8 @@ public class SmtpTransport extends Transport {
                 }
             } catch (Exception e) {
                 if (Config.LOGD) {
-                    if (k9.DEBUG) {
-                        Log.d(k9.LOG_TAG, "Unable to look up localhost");
+                    if (Email.DEBUG) {
+                        Log.d(Email.LOG_TAG, "Unable to look up localhost");
                     }
                 }
             }
@@ -283,8 +283,8 @@ public class SmtpTransport extends Transport {
         }
         String ret = sb.toString();
         if (Config.LOGD) {
-            if (k9.DEBUG) {
-                Log.d(k9.LOG_TAG, "<<< " + ret);
+            if (Email.DEBUG) {
+                Log.d(Email.LOG_TAG, "<<< " + ret);
             }
         }
         return ret;
@@ -292,8 +292,8 @@ public class SmtpTransport extends Transport {
 
     private void writeLine(String s) throws IOException {
         if (Config.LOGD) {
-            if (k9.DEBUG) {
-                Log.d(k9.LOG_TAG, ">>> " + s);
+            if (Email.DEBUG) {
+                Log.d(Email.LOG_TAG, ">>> " + s);
             }
         }
         mOut.write(s.getBytes());
diff --git a/src/com/android/email/mail/transport/StatusOutputStream.java b/src/com/android/email/mail/transport/StatusOutputStream.java
index c97e08e2e..4e51569b6 100644
--- a/src/com/android/email/mail/transport/StatusOutputStream.java
+++ b/src/com/android/email/mail/transport/StatusOutputStream.java
@@ -1,10 +1,10 @@
-package com.fsck.k9.mail.transport;
+package com.android.email.mail.transport;
 
 import java.io.FilterOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import com.fsck.k9.k9;
+import com.android.email.Email;
 
 import android.util.Config;
 import android.util.Log;
@@ -22,7 +22,7 @@ public class StatusOutputStream extends FilterOutputStream {
         mCount++;
         if (Config.LOGV) {
             if (mCount % 1024 == 0) {
-                Log.v(k9.LOG_TAG, "# " + mCount);
+                Log.v(Email.LOG_TAG, "# " + mCount);
             }
         }
     }
diff --git a/src/com/android/email/mail/transport/WebDavTransport.java b/src/com/android/email/mail/transport/WebDavTransport.java
index 292fc101d..3735678fe 100644
--- a/src/com/android/email/mail/transport/WebDavTransport.java
+++ b/src/com/android/email/mail/transport/WebDavTransport.java
@@ -1,5 +1,5 @@
 
-package com.fsck.k9.mail.transport;
+package com.android.email.mail.transport;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -37,22 +37,22 @@ import org.xml.sax.XMLReader;
 import android.util.Config;
 import android.util.Log;
 
-import com.fsck.k9.k9;
-import com.fsck.k9.PeekableInputStream;
-import com.fsck.k9.codec.binary.Base64;
-import com.fsck.k9.mail.Address;
-import com.fsck.k9.mail.AuthenticationFailedException;
-import com.fsck.k9.mail.Folder;
-import com.fsck.k9.mail.Message;
-import com.fsck.k9.mail.MessagingException;
-import com.fsck.k9.mail.Transport;
-import com.fsck.k9.mail.CertificateValidationException;
-import com.fsck.k9.mail.Message.RecipientType;
-import com.fsck.k9.mail.store.TrustManagerFactory;
-import com.fsck.k9.mail.store.WebDavStore;
-import com.fsck.k9.mail.store.WebDavStore.HttpGeneric;
-import com.fsck.k9.mail.store.WebDavStore.ParsedDataSet;
-import com.fsck.k9.mail.store.WebDavStore.WebDavHandler;
+import com.android.email.Email;
+import com.android.email.PeekableInputStream;
+import com.android.email.codec.binary.Base64;
+import com.android.email.mail.Address;
+import com.android.email.mail.AuthenticationFailedException;
+import com.android.email.mail.Folder;
+import com.android.email.mail.Message;
+import com.android.email.mail.MessagingException;
+import com.android.email.mail.Transport;
+import com.android.email.mail.CertificateValidationException;
+import com.android.email.mail.Message.RecipientType;
+import com.android.email.mail.store.TrustManagerFactory;
+import com.android.email.mail.store.WebDavStore;
+import com.android.email.mail.store.WebDavStore.HttpGeneric;
+import com.android.email.mail.store.WebDavStore.ParsedDataSet;
+import com.android.email.mail.store.WebDavStore.WebDavHandler;
 
 public class WebDavTransport extends Transport {
     public static final int CONNECTION_SECURITY_NONE = 0;
@@ -85,11 +85,11 @@ public class WebDavTransport extends Transport {
      */
     public WebDavTransport(String _uri) throws MessagingException {
     	store = new WebDavStore(_uri);
-        Log.d(k9.LOG_TAG, ">>> New WebDavTransport creation complete");
+        Log.d(Email.LOG_TAG, ">>> New WebDavTransport creation complete");
     }
 
     public void open() throws MessagingException {
-        Log.d(k9.LOG_TAG, ">>> open called on WebDavTransport ");
+        Log.d(Email.LOG_TAG, ">>> open called on WebDavTransport ");
         if (store.needAuth()) {
             store.authenticate();
         }
@@ -116,7 +116,7 @@ public class WebDavTransport extends Transport {
     }
     
     public void sendMessage(Message message) throws MessagingException {
-        Log.d(k9.LOG_TAG, ">>> sendMessage called.");
+        Log.d(Email.LOG_TAG, ">>> sendMessage called.");
 
         DefaultHttpClient httpclient = new DefaultHttpClient();
         HttpGeneric httpmethod;
@@ -130,13 +130,13 @@ public class WebDavTransport extends Transport {
         	try {
         		subject = message.getSubject();
         	} catch (MessagingException e) {
-        		Log.e(k9.LOG_TAG, "MessagingException while retrieving Subject: " + e);
+        		Log.e(Email.LOG_TAG, "MessagingException while retrieving Subject: " + e);
         		subject = "";
         	}
         	try {
         		out = new ByteArrayOutputStream(message.getSize());
         	} catch (MessagingException e) {
-        		Log.e(k9.LOG_TAG, "MessagingException while getting size of message: " + e);
+        		Log.e(Email.LOG_TAG, "MessagingException while getting size of message: " + e);
         		out = new ByteArrayOutputStream();
         	}
         	open();
@@ -178,12 +178,12 @@ public class WebDavTransport extends Transport {
         	}
 
         } catch (UnsupportedEncodingException uee) {
-        	Log.e(k9.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
+        	Log.e(Email.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
         } catch (IOException ioe) {
-        	Log.e(k9.LOG_TAG, "IOException in getMessageCount() " + ioe);
+        	Log.e(Email.LOG_TAG, "IOException in getMessageCount() " + ioe);
         	throw new MessagingException("Unable to send message", ioe);
         }
-        Log.d(k9.LOG_TAG, ">>> getMessageCount finished");
+        Log.d(Email.LOG_TAG, ">>> getMessageCount finished");
     }
 
 }
diff --git a/src/com/android/email/provider/AttachmentProvider.java b/src/com/android/email/provider/AttachmentProvider.java
index 70e0dbb2c..95136fa10 100644
--- a/src/com/android/email/provider/AttachmentProvider.java
+++ b/src/com/android/email/provider/AttachmentProvider.java
@@ -1,4 +1,4 @@
-package com.fsck.k9.provider;
+package com.android.email.provider;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -21,16 +21,16 @@ import android.provider.OpenableColumns;
 import android.util.Config;
 import android.util.Log;
 
-import com.fsck.k9.Account;
-import com.fsck.k9.k9;
-import com.fsck.k9.Utility;
-import com.fsck.k9.mail.internet.MimeUtility;
+import com.android.email.Account;
+import com.android.email.Email;
+import com.android.email.Utility;
+import com.android.email.mail.internet.MimeUtility;
 
 /*
  * A simple ContentProvider that allows file access to Email's attachments.
  */
 public class AttachmentProvider extends ContentProvider {
-    public static final Uri CONTENT_URI = Uri.parse( "content://com.fsck.k9.attachmentprovider");
+    public static final Uri CONTENT_URI = Uri.parse( "content://com.android.email.attachmentprovider");
 
     private static final String FORMAT_RAW = "RAW";
     private static final String FORMAT_THUMBNAIL = "THUMBNAIL";
diff --git a/src/com/android/email/service/BootReceiver.java b/src/com/android/email/service/BootReceiver.java
index 19714e34e..3867eb574 100644
--- a/src/com/android/email/service/BootReceiver.java
+++ b/src/com/android/email/service/BootReceiver.java
@@ -1,7 +1,7 @@
 
-package com.fsck.k9.service;
+package com.android.email.service;
 
-import com.fsck.k9.MessagingController;
+import com.android.email.MessagingController;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/src/com/android/email/service/MailService.java b/src/com/android/email/service/MailService.java
index 03b776f73..99da9f1a8 100644
--- a/src/com/android/email/service/MailService.java
+++ b/src/com/android/email/service/MailService.java
@@ -1,5 +1,5 @@
 
-package com.fsck.k9.service;
+package com.android.email.service;
 
 import java.util.HashMap;
 
@@ -17,21 +17,21 @@ import android.util.Log;
 import android.text.TextUtils;
 import android.net.Uri;
 
-import com.fsck.k9.Account;
-import com.fsck.k9.k9;
-import com.fsck.k9.MessagingController;
-import com.fsck.k9.MessagingListener;
-import com.fsck.k9.Preferences;
-import com.fsck.k9.R;
-import com.fsck.k9.activity.Accounts;
-import com.fsck.k9.activity.FolderMessageList;
+import com.android.email.Account;
+import com.android.email.Email;
+import com.android.email.MessagingController;
+import com.android.email.MessagingListener;
+import com.android.email.Preferences;
+import com.android.email.R;
+import com.android.email.activity.Accounts;
+import com.android.email.activity.FolderMessageList;
 
 /**
  */
 public class MailService extends Service {
-    private static final String ACTION_CHECK_MAIL = "com.fsck.k9.intent.action.MAIL_SERVICE_WAKEUP";
-    private static final String ACTION_RESCHEDULE = "com.fsck.k9.intent.action.MAIL_SERVICE_RESCHEDULE";
-    private static final String ACTION_CANCEL = "com.fsck.k9.intent.action.MAIL_SERVICE_CANCEL";
+    private static final String ACTION_CHECK_MAIL = "com.android.email.intent.action.MAIL_SERVICE_WAKEUP";
+    private static final String ACTION_RESCHEDULE = "com.android.email.intent.action.MAIL_SERVICE_RESCHEDULE";
+    private static final String ACTION_CANCEL = "com.android.email.intent.action.MAIL_SERVICE_CANCEL";
 
     private Listener mListener = new Listener();
 
@@ -59,20 +59,20 @@ public class MailService extends Service {
         MessagingController.getInstance(getApplication()).addListener(mListener);
         if (ACTION_CHECK_MAIL.equals(intent.getAction())) {
             if (Config.LOGV) {
-                Log.v(k9.LOG_TAG, "***** MailService *****: checking mail");
+                Log.v(Email.LOG_TAG, "***** MailService *****: checking mail");
             }
             MessagingController.getInstance(getApplication()).checkMail(this, null, mListener);
         }
         else if (ACTION_CANCEL.equals(intent.getAction())) {
             if (Config.LOGV) {
-                Log.v(k9.LOG_TAG, "***** MailService *****: cancel");
+                Log.v(Email.LOG_TAG, "***** MailService *****: cancel");
             }
             cancel();
             stopSelf(startId);
         }
         else if (ACTION_RESCHEDULE.equals(intent.getAction())) {
             if (Config.LOGV) {
-                Log.v(k9.LOG_TAG, "***** MailService *****: reschedule");
+                Log.v(Email.LOG_TAG, "***** MailService *****: reschedule");
             }
             reschedule();
             stopSelf(startId);
@@ -88,7 +88,7 @@ public class MailService extends Service {
     private void cancel() {
         AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
         Intent i = new Intent();
-        i.setClassName("com.fsck.k9", "com.fsck.k9.service.MailService");
+        i.setClassName("com.android.email", "com.android.email.service.MailService");
         i.setAction(ACTION_CHECK_MAIL);
         PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
         alarmMgr.cancel(pi);
@@ -97,7 +97,7 @@ public class MailService extends Service {
     private void reschedule() {
         AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
         Intent i = new Intent();
-        i.setClassName("com.fsck.k9", "com.fsck.k9.service.MailService");
+        i.setClassName("com.android.email", "com.android.email.service.MailService");
         i.setAction(ACTION_CHECK_MAIL);
         PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
 
@@ -170,7 +170,7 @@ public class MailService extends Service {
                 } else {
                     Account account1 = accountsWithNewMail.keySet().iterator().next();
                     int totalNewMails = accountsWithNewMail.get(account1);
-                    Intent i = FolderMessageList.actionHandleAccountIntent(context, account1, k9.INBOX);
+                    Intent i = FolderMessageList.actionHandleAccountIntent(context, account1, Email.INBOX);
                     PendingIntent pi = PendingIntent.getActivity(context, 0, i, 0);
                     notif.setLatestEventInfo(context, getString(R.string.notification_new_title),
                             getString(R.string.notification_new_one_account_fmt, totalNewMails,