Even more progressive rename/unfork work

This commit is contained in:
Jesse Vincent 2008-12-16 23:34:01 +00:00
parent ac55d3034b
commit 28e8827827
70 changed files with 535 additions and 535 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fsck.k9" package="com.android.email"
android:versionCode="22" android:versionCode="22"
android:versionName="0.22" android:versionName="0.22"
> >
@ -10,12 +10,12 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<permission android:name="com.fsck.k9.permission.READ_ATTACHMENT" <permission android:name="com.android.email.permission.READ_ATTACHMENT"
android:permissionGroup="android.permission-group.MESSAGES" android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous" android:protectionLevel="dangerous"
android:label="@string/read_attachment_label" android:label="@string/read_attachment_label"
android:description="@string/read_attachment_desc"/> android:description="@string/read_attachment_desc"/>
<uses-permission android:name="com.fsck.k9.permission.READ_ATTACHMENT"/> <uses-permission android:name="com.android.email.permission.READ_ATTACHMENT"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" <application android:icon="@drawable/icon" android:label="@string/app_name"
android:name="k9"> android:name="k9">
<activity android:name=".activity.Welcome"> <activity android:name=".activity.Welcome">
@ -131,10 +131,10 @@
</service> </service>
<provider <provider
android:name=".provider.AttachmentProvider" android:name=".provider.AttachmentProvider"
android:authorities="com.fsck.k9.attachmentprovider" android:authorities="com.android.email.attachmentprovider"
android:multiprocess="true" android:multiprocess="true"
android:grantUriPermissions="true" android:grantUriPermissions="true"
android:readPermission="com.fsck.k9.permission.READ_ATTACHMENT" android:readPermission="com.android.email.permission.READ_ATTACHMENT"
/> />
</application> </application>
</manifest> </manifest>

View file

@ -7,7 +7,7 @@
<property name="android-tools" value="${sdk-folder}/tools" /> <property name="android-tools" value="${sdk-folder}/tools" />
<!-- Application Package Name --> <!-- Application Package Name -->
<property name="application-package" value="com.fsck.k9.activity" /> <property name="application-package" value="com.android.email.activity" />
<!-- The intermediates directory --> <!-- The intermediates directory -->
<!-- Eclipse uses "bin" for its own output, so we do the same. --> <!-- Eclipse uses "bin" for its own output, so we do the same. -->

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.io.Serializable; import java.io.Serializable;
import java.util.Arrays; import java.util.Arrays;
@ -306,7 +306,7 @@ public class Account implements Serializable {
public int getDisplayCount() { public int getDisplayCount() {
if (mDisplayCount == -1) { if (mDisplayCount == -1) {
this.mDisplayCount = k9.DEFAULT_VISIBLE_LIMIT; this.mDisplayCount = Email.DEFAULT_VISIBLE_LIMIT;
} }
return mDisplayCount; return mDisplayCount;
} }
@ -325,7 +325,7 @@ public class Account implements Serializable {
if (displayCount != -1) { if (displayCount != -1) {
this.mDisplayCount = displayCount; this.mDisplayCount = displayCount;
} else { } else {
this.mDisplayCount = k9.DEFAULT_VISIBLE_LIMIT; this.mDisplayCount = Email.DEFAULT_VISIBLE_LIMIT;
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.io.File; import java.io.File;
@ -10,13 +10,13 @@ import android.content.pm.PackageManager;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.activity.MessageCompose; import com.android.email.activity.MessageCompose;
import com.fsck.k9.mail.internet.BinaryTempFileBody; import com.android.email.mail.internet.BinaryTempFileBody;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
import com.fsck.k9.service.BootReceiver; import com.android.email.service.BootReceiver;
import com.fsck.k9.service.MailService; import com.android.email.service.MailService;
public class k9 extends Application { public class Email extends Application {
public static Application app = null; public static Application app = null;
public static File tempDirectory; public static File tempDirectory;
public static final String LOG_TAG = "k9"; public static final String LOG_TAG = "k9";

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.fsck.k9; package com.android.email;
import static android.provider.Contacts.ContactMethods.CONTENT_EMAIL_URI; import static android.provider.Contacts.ContactMethods.CONTENT_EMAIL_URI;
import android.content.ContentResolver; import android.content.ContentResolver;
@ -27,7 +27,7 @@ import android.view.View;
import android.widget.ResourceCursorAdapter; import android.widget.ResourceCursorAdapter;
import android.widget.TextView; import android.widget.TextView;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
public class EmailAddressAdapter extends ResourceCursorAdapter { public class EmailAddressAdapter extends ResourceCursorAdapter {
public static final int NAME_INDEX = 1; public static final int NAME_INDEX = 1;

View file

@ -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.Config;
import android.util.Log; import android.util.Log;

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

View file

@ -5,10 +5,10 @@
* should not be modified by hand. * should not be modified by hand.
*/ */
package com.fsck.k9; package com.android.email;
public final class Manifest { public final class Manifest {
public static final class permission { 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";
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -15,23 +15,23 @@ import android.os.Process;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.mail.FetchProfile; import com.android.email.mail.FetchProfile;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessageRetrievalListener; import com.android.email.mail.MessageRetrievalListener;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.Transport; import com.android.email.mail.Transport;
import com.fsck.k9.mail.Folder.FolderType; import com.android.email.mail.Folder.FolderType;
import com.fsck.k9.mail.Folder.OpenMode; import com.android.email.mail.Folder.OpenMode;
import com.fsck.k9.mail.internet.MimeHeader; import com.android.email.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.LocalStore; import com.android.email.mail.store.LocalStore;
import com.fsck.k9.mail.store.LocalStore.LocalFolder; import com.android.email.mail.store.LocalStore.LocalFolder;
import com.fsck.k9.mail.store.LocalStore.LocalMessage; import com.android.email.mail.store.LocalStore.LocalMessage;
import com.fsck.k9.mail.store.LocalStore.PendingCommand; import com.android.email.mail.store.LocalStore.PendingCommand;
/** /**
* Starts a long running (application) Thread that will run through commands * 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 int MAX_SMALL_MESSAGE_SIZE = (25 * 1024);
private static final String PENDING_COMMAND_TRASH = 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 = 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 = private static final String PENDING_COMMAND_APPEND =
"com.fsck.k9.MessagingController.append"; "com.android.email.MessagingController.append";
private static MessagingController inst = null; private static MessagingController inst = null;
private BlockingQueue<Command> mCommands = new LinkedBlockingQueue<Command>(); private BlockingQueue<Command> mCommands = new LinkedBlockingQueue<Command>();
@ -118,7 +118,7 @@ public class MessagingController implements Runnable {
} }
catch (Exception e) { catch (Exception e) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "Error running command", e); Log.v(Email.LOG_TAG, "Error running command", e);
} }
} }
mBusy = false; mBusy = false;
@ -218,7 +218,7 @@ public class MessagingController implements Runnable {
*/ */
for (Folder localFolder : localFolders) { for (Folder localFolder : localFolders) {
String localFolderName = localFolder.getName(); String localFolderName = localFolder.getName();
if (localFolderName.equalsIgnoreCase(k9.INBOX) || if (localFolderName.equalsIgnoreCase(Email.INBOX) ||
localFolderName.equals(account.getTrashFolderName()) || localFolderName.equals(account.getTrashFolderName()) ||
localFolderName.equals(account.getOutboxFolderName()) || localFolderName.equals(account.getOutboxFolderName()) ||
localFolderName.equals(account.getDraftsFolderName()) || localFolderName.equals(account.getDraftsFolderName()) ||
@ -313,7 +313,7 @@ public class MessagingController implements Runnable {
localStore.resetVisibleLimits(account.getDisplayCount()); localStore.resetVisibleLimits(account.getDisplayCount());
} }
catch (MessagingException e) { 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 Open the folder
Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash) Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash)
Get the message count Get the message count
Get the list of the newest k9.DEFAULT_VISIBLE_LIMIT messages Get the list of the newest Email.DEFAULT_VISIBLE_LIMIT messages
getMessages(messageCount - k9.DEFAULT_VISIBLE_LIMIT, messageCount) getMessages(messageCount - Email.DEFAULT_VISIBLE_LIMIT, messageCount)
See if we have each message locally, if not fetch it's flags and envelope See if we have each message locally, if not fetch it's flags and envelope
Get and update the unread count for the folder Get and update the unread count for the folder
Update the remote flags of any messages we have locally with an internal date 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) { catch (Exception e) {
Log.e(k9.LOG_TAG, Log.e(Email.LOG_TAG,
"Error while storing downloaded message.", "Error while storing downloaded message.",
e); e);
} }
@ -745,7 +745,7 @@ s * critical data as fast as possible, and then we'll fill in the de
} }
catch (Exception e) { catch (Exception e) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "synchronizeMailbox", e); Log.v(Email.LOG_TAG, "synchronizeMailbox", e);
} }
for (MessagingListener l : mListeners) { for (MessagingListener l : mListeners) {
l.synchronizeMailboxFailed( l.synchronizeMailboxFailed(
@ -776,7 +776,7 @@ s * critical data as fast as possible, and then we'll fill in the de
} }
catch (MessagingException me) { catch (MessagingException me) {
if (Config.LOGV) { 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 * 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) { catch (MessagingException me) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "", me); Log.v(Email.LOG_TAG, "", me);
} }
for (MessagingListener l : mListeners) { for (MessagingListener l : mListeners) {
l.loadAttachmentFailed(account, message, part, tag, me.getMessage()); 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) { catch (Exception e) {
// TODO // TODO
if (Config.LOGV) { 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 if (autoCheckIntervalTime>0
&& (now-lastAutoCheckTime)>autoCheckIntervalTime) { && (now-lastAutoCheckTime)>autoCheckIntervalTime) {
sendPendingMessagesSynchronous(account); sendPendingMessagesSynchronous(account);
synchronizeMailboxSynchronous(account, k9.INBOX); synchronizeMailboxSynchronous(account, Email.INBOX);
//This saves the last auto check time even if sync fails //This saves the last auto check time even if sync fails
//TODO: Listen for both send and sync success and failures //TODO: Listen for both send and sync success and failures
//and only save last auto check time is not errors //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); processPendingCommands(account);
} }
catch (MessagingException e) { 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);
} }
} }

View file

@ -1,11 +1,11 @@
package com.fsck.k9; package com.android.email;
import android.content.Context; import android.content.Context;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
/** /**
* Defines the interface that MessagingController will use to callback to requesters. This class * Defines the interface that MessagingController will use to callback to requesters. This class

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.util.Arrays; import java.util.Arrays;
@ -116,7 +116,7 @@ public class Preferences {
public void dump() { public void dump() {
if (Config.LOGV) { if (Config.LOGV) {
for (String key : mSharedPreferences.getAll().keySet()) { 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));
} }
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9; package com.android.email;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -7,7 +7,7 @@ import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import com.fsck.k9.codec.binary.Base64; import com.android.email.codec.binary.Base64;
import android.text.Editable; import android.text.Editable;
import android.widget.TextView; import android.widget.TextView;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity; package com.android.email.activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
@ -24,17 +24,17 @@ import android.widget.TextView;
import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.MessagingController; import com.android.email.MessagingController;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.activity.setup.AccountSettings; import com.android.email.activity.setup.AccountSettings;
import com.fsck.k9.activity.setup.AccountSetupBasics; import com.android.email.activity.setup.AccountSetupBasics;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.store.LocalStore; import com.android.email.mail.store.LocalStore;
import com.fsck.k9.mail.store.LocalStore.LocalFolder; import com.android.email.mail.store.LocalStore.LocalFolder;
public class Accounts extends ListActivity implements OnItemClickListener, OnClickListener { public class Accounts extends ListActivity implements OnItemClickListener, OnClickListener {
private static final int DIALOG_REMOVE_ACCOUNT = 1; private static final int DIALOG_REMOVE_ACCOUNT = 1;
@ -152,7 +152,7 @@ public class Accounts extends ListActivity implements OnItemClickListener, OnCli
// Ignore // Ignore
} }
mSelectedContextAccount.delete(Preferences.getPreferences(Accounts.this)); mSelectedContextAccount.delete(Preferences.getPreferences(Accounts.this));
k9.setServicesEnabled(Accounts.this); Email.setServicesEnabled(Accounts.this);
refresh(); refresh();
} }
}) })
@ -269,7 +269,7 @@ public class Accounts extends ListActivity implements OnItemClickListener, OnCli
LocalStore localStore = (LocalStore) Store.getInstance( LocalStore localStore = (LocalStore) Store.getInstance(
account.getLocalStoreUri(), account.getLocalStoreUri(),
getApplication()); getApplication());
LocalFolder localFolder = (LocalFolder) localStore.getFolder(k9.INBOX); LocalFolder localFolder = (LocalFolder) localStore.getFolder(Email.INBOX);
if (localFolder.exists()) { if (localFolder.exists()) {
unreadMessageCount = localFolder.getUnreadMessageCount(); unreadMessageCount = localFolder.getUnreadMessageCount();
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity; package com.android.email.activity;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
@ -10,9 +10,9 @@ import android.widget.CompoundButton;
import android.widget.TextView; import android.widget.TextView;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
public class Debug extends Activity implements OnCheckedChangeListener { public class Debug extends Activity implements OnCheckedChangeListener {
private TextView mVersionView; 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(), mVersionView.setText(String.format(getString(R.string.debug_version_fmt).toString(),
getString(R.string.build_number))); getString(R.string.build_number)));
mEnableDebugLoggingView.setChecked(k9.DEBUG); mEnableDebugLoggingView.setChecked(Email.DEBUG);
mEnableSensitiveLoggingView.setChecked(k9.DEBUG_SENSITIVE); mEnableSensitiveLoggingView.setChecked(Email.DEBUG_SENSITIVE);
} }
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (buttonView.getId() == R.id.debug_logging) { if (buttonView.getId() == R.id.debug_logging) {
k9.DEBUG = isChecked; Email.DEBUG = isChecked;
mPreferences.setEnableDebugLogging(k9.DEBUG); mPreferences.setEnableDebugLogging(Email.DEBUG);
} else if (buttonView.getId() == R.id.sensitive_logging) { } else if (buttonView.getId() == R.id.sensitive_logging) {
k9.DEBUG_SENSITIVE = isChecked; Email.DEBUG_SENSITIVE = isChecked;
mPreferences.setEnableSensitiveLogging(k9.DEBUG_SENSITIVE); mPreferences.setEnableSensitiveLogging(Email.DEBUG_SENSITIVE);
} }
} }

View file

@ -1,4 +1,4 @@
package com.fsck.k9.activity; package com.android.email.activity;
import java.text.DateFormat; import java.text.DateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -32,24 +32,24 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.ExpandableListView.ExpandableListContextMenuInfo; import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.MessagingController; import com.android.email.MessagingController;
import com.fsck.k9.MessagingListener; import com.android.email.MessagingListener;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.activity.FolderMessageList.FolderMessageListAdapter.FolderInfoHolder; import com.android.email.activity.FolderMessageList.FolderMessageListAdapter.FolderInfoHolder;
import com.fsck.k9.activity.FolderMessageList.FolderMessageListAdapter.MessageInfoHolder; import com.android.email.activity.FolderMessageList.FolderMessageListAdapter.MessageInfoHolder;
import com.fsck.k9.activity.setup.AccountSettings; import com.android.email.activity.setup.AccountSettings;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.store.LocalStore.LocalMessage; import com.android.email.mail.store.LocalStore.LocalMessage;
import com.fsck.k9.mail.store.LocalStore; import com.android.email.mail.store.LocalStore;
/** /**
* FolderMessageList is the primary user interface for the program. This Activity shows * 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 EXTRA_INITIAL_FOLDER = "initialFolder";
private static final String STATE_KEY_LIST = 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 = 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 = 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); 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); mHandler.progress(false);
if (Config.LOGV) { 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); mFolders.add(holder);
} }
holder.name = folder.getName(); 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); holder.displayName = getString(R.string.special_mailbox_name_inbox);
// XXX TOOD nuke when we do this for all folders // XXX TOOD nuke when we do this for all folders
try { try {
holder.unreadMessageCount = folder.getUnreadMessageCount(); holder.unreadMessageCount = folder.getUnreadMessageCount();
} }
catch (MessagingException me) { 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(); holder.unreadMessageCount = folder.getUnreadMessageCount();
} }
catch (MessagingException me) { 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 (mRestoredState != null) {
// if (Config.LOGV) { // 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 = // Parcelable listViewState =
// mListView.onRestoreInstanceState(mListViewState); // mListView.onRestoreInstanceState(mListViewState);
@ -1141,7 +1141,7 @@ public class FolderMessageList extends ExpandableListActivity {
else { else {
if (folder.status == null) { if (folder.status == null) {
// holder.main.setText(getString(R.string.message_list_load_more_messages_action)); // 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"); holder.main.setText("Load up to " + mAccount.getDisplayCount() + " more");
} }
else { else {
@ -1227,9 +1227,9 @@ public class FolderMessageList extends ExpandableListActivity {
public int compareTo(FolderInfoHolder o) { public int compareTo(FolderInfoHolder o) {
String s1 = this.name; String s1 = this.name;
String s2 = o.name; String s2 = o.name;
if (k9.INBOX.equalsIgnoreCase(s1)) { if (Email.INBOX.equalsIgnoreCase(s1)) {
return -1; return -1;
} else if (k9.INBOX.equalsIgnoreCase(s2)) { } else if (Email.INBOX.equalsIgnoreCase(s2)) {
return 1; return 1;
} else } else
return s1.compareToIgnoreCase(s2); return s1.compareToIgnoreCase(s2);
@ -1276,7 +1276,7 @@ public class FolderMessageList extends ExpandableListActivity {
} }
catch (MessagingException me) { catch (MessagingException me) {
if (Config.LOGV) { 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);
} }
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity; package com.android.email.activity;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
@ -36,53 +36,53 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.AutoCompleteTextView.Validator; import android.widget.AutoCompleteTextView.Validator;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.EmailAddressAdapter; import com.android.email.EmailAddressAdapter;
import com.fsck.k9.EmailAddressValidator; import com.android.email.EmailAddressValidator;
import com.fsck.k9.MessagingController; import com.android.email.MessagingController;
import com.fsck.k9.MessagingListener; import com.android.email.MessagingListener;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Multipart; import com.android.email.mail.Multipart;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.internet.MimeBodyPart; import com.android.email.mail.internet.MimeBodyPart;
import com.fsck.k9.mail.internet.MimeHeader; import com.android.email.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
import com.fsck.k9.mail.internet.MimeMultipart; import com.android.email.mail.internet.MimeMultipart;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.fsck.k9.mail.internet.TextBody; import com.android.email.mail.internet.TextBody;
import com.fsck.k9.mail.store.LocalStore; import com.android.email.mail.store.LocalStore;
import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBody; import com.android.email.mail.store.LocalStore.LocalAttachmentBody;
public class MessageCompose extends Activity implements OnClickListener, OnFocusChangeListener { 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 = "com.android.email.intent.action.REPLY";
private static final String ACTION_REPLY_ALL = "com.fsck.k9.intent.action.REPLY_ALL"; private static final String ACTION_REPLY_ALL = "com.android.email.intent.action.REPLY_ALL";
private static final String ACTION_FORWARD = "com.fsck.k9.intent.action.FORWARD"; private static final String ACTION_FORWARD = "com.android.email.intent.action.FORWARD";
private static final String ACTION_EDIT_DRAFT = "com.fsck.k9.intent.action.EDIT_DRAFT"; 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_ACCOUNT = "account";
private static final String EXTRA_FOLDER = "folder"; private static final String EXTRA_FOLDER = "folder";
private static final String EXTRA_MESSAGE = "message"; private static final String EXTRA_MESSAGE = "message";
private static final String STATE_KEY_ATTACHMENTS = 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 = 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 = 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 = 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 = 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 = 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_ON = 1;
private static final int MSG_PROGRESS_OFF = 2; private static final int MSG_PROGRESS_OFF = 2;
@ -373,7 +373,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
String type = intent.getType(); String type = intent.getType();
Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM); Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
if (stream != null && type != null) { 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); addAttachment(stream);
} }
} }
@ -615,7 +615,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
message = createMessage(); message = createMessage();
} }
catch (MessagingException me) { 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); 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() { private void onAddAttachment() {
Intent i = new Intent(Intent.ACTION_GET_CONTENT); Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE); 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); startActivityForResult(Intent.createChooser(i, null), ACTIVITY_REQUEST_PICK_ATTACHMENT);
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity; package com.android.email.activity;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -48,32 +48,32 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.MessagingController; import com.android.email.MessagingController;
import com.fsck.k9.MessagingListener; import com.android.email.MessagingListener;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Multipart; import com.android.email.mail.Multipart;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.internet.MimeHeader; import com.android.email.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBody; import com.android.email.mail.store.LocalStore.LocalAttachmentBody;
import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBodyPart; import com.android.email.mail.store.LocalStore.LocalAttachmentBodyPart;
import com.fsck.k9.mail.store.LocalStore.LocalMessage; import com.android.email.mail.store.LocalStore.LocalMessage;
import com.fsck.k9.provider.AttachmentProvider; import com.android.email.provider.AttachmentProvider;
public class MessageView extends Activity public class MessageView extends Activity
implements UrlInterceptHandler, OnClickListener { implements UrlInterceptHandler, OnClickListener {
private static final String EXTRA_ACCOUNT = "com.fsck.k9.MessageView_account"; private static final String EXTRA_ACCOUNT = "com.android.email.MessageView_account";
private static final String EXTRA_FOLDER = "com.fsck.k9.MessageView_folder"; private static final String EXTRA_FOLDER = "com.android.email.MessageView_folder";
private static final String EXTRA_MESSAGE = "com.fsck.k9.MessageView_message"; private static final String EXTRA_MESSAGE = "com.android.email.MessageView_message";
private static final String EXTRA_FOLDER_UIDS = "com.fsck.k9.MessageView_folderUids"; private static final String EXTRA_FOLDER_UIDS = "com.android.email.MessageView_folderUids";
private static final String EXTRA_NEXT = "com.fsck.k9.MessageView_next"; private static final String EXTRA_NEXT = "com.android.email.MessageView_next";
private TextView mFromView; private TextView mFromView;
private TextView mDateView; private TextView mDateView;
@ -656,19 +656,19 @@ public class MessageView extends Activity
Button attachmentDownload = (Button)view.findViewById(R.id.download); Button attachmentDownload = (Button)view.findViewById(R.id.download);
if ((!MimeUtility.mimeTypeMatches(attachment.contentType, if ((!MimeUtility.mimeTypeMatches(attachment.contentType,
k9.ACCEPTABLE_ATTACHMENT_VIEW_TYPES)) Email.ACCEPTABLE_ATTACHMENT_VIEW_TYPES))
|| (MimeUtility.mimeTypeMatches(attachment.contentType, || (MimeUtility.mimeTypeMatches(attachment.contentType,
k9.UNACCEPTABLE_ATTACHMENT_VIEW_TYPES))) { Email.UNACCEPTABLE_ATTACHMENT_VIEW_TYPES))) {
attachmentView.setVisibility(View.GONE); attachmentView.setVisibility(View.GONE);
} }
if ((!MimeUtility.mimeTypeMatches(attachment.contentType, if ((!MimeUtility.mimeTypeMatches(attachment.contentType,
k9.ACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES)) Email.ACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES))
|| (MimeUtility.mimeTypeMatches(attachment.contentType, || (MimeUtility.mimeTypeMatches(attachment.contentType,
k9.UNACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES))) { Email.UNACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES))) {
attachmentDownload.setVisibility(View.GONE); attachmentDownload.setVisibility(View.GONE);
} }
if (attachment.size > k9.MAX_ATTACHMENT_DOWNLOAD_SIZE) { if (attachment.size > Email.MAX_ATTACHMENT_DOWNLOAD_SIZE) {
attachmentView.setVisibility(View.GONE); attachmentView.setVisibility(View.GONE);
attachmentDownload.setVisibility(View.GONE); attachmentDownload.setVisibility(View.GONE);
} }
@ -724,7 +724,7 @@ public class MessageView extends Activity
} }
catch (MessagingException me) { catch (MessagingException me) {
if (Config.LOGV) { 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) { catch (Exception e) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "loadMessageForViewBodyAvailable", e); Log.v(Email.LOG_TAG, "loadMessageForViewBodyAvailable", e);
} }
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity; package com.android.email.activity;
import android.content.Context; import android.content.Context;

View file

@ -1,9 +1,9 @@
package com.fsck.k9.activity; package com.android.email.activity;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
@ -26,7 +26,7 @@ public class Welcome extends Activity {
Account[] accounts = Preferences.getPreferences(this).getAccounts(); Account[] accounts = Preferences.getPreferences(this).getAccounts();
if (accounts.length == 1) { if (accounts.length == 1) {
FolderMessageList.actionHandleAccount(this, accounts[0], k9.INBOX); FolderMessageList.actionHandleAccount(this, accounts[0], Email.INBOX);
} else { } else {
startActivity(new Intent(this, Accounts.class)); startActivity(new Intent(this, Accounts.class));
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -13,10 +13,10 @@ import android.preference.CheckBoxPreference;
import android.preference.Preference; import android.preference.Preference;
import android.preference.RingtonePreference; import android.preference.RingtonePreference;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
public class AccountSettings extends PreferenceActivity { public class AccountSettings extends PreferenceActivity {
private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_ACCOUNT = "account";
@ -166,7 +166,7 @@ public class AccountSettings extends PreferenceActivity {
SharedPreferences prefs = mAccountRingtone.getPreferenceManager().getSharedPreferences(); SharedPreferences prefs = mAccountRingtone.getPreferenceManager().getSharedPreferences();
mAccount.setRingtone(prefs.getString(PREFERENCE_RINGTONE, null)); mAccount.setRingtone(prefs.getString(PREFERENCE_RINGTONE, null));
mAccount.save(Preferences.getPreferences(this)); mAccount.save(Preferences.getPreferences(this));
k9.setServicesEnabled(this); Email.setServicesEnabled(this);
} }
@Override @Override

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -12,8 +12,8 @@ import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.Button; import android.widget.Button;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.R; import com.android.email.R;
/** /**
* Prompts the user to select an account type. The account type, along with the * Prompts the user to select an account type. The account type, along with the

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import java.io.Serializable; import java.io.Serializable;
import java.net.URI; import java.net.URI;
@ -26,12 +26,12 @@ import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.EditText; import android.widget.EditText;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.EmailAddressValidator; import com.android.email.EmailAddressValidator;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
/** /**
* Prompts the user for the email address and password. Also prompts for * 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 public class AccountSetupBasics extends Activity
implements OnClickListener, TextWatcher { 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 int DIALOG_NOTE = 1;
private final static String STATE_KEY_PROVIDER = private final static String STATE_KEY_PROVIDER =
"com.fsck.k9.AccountSetupBasics.provider"; "com.android.email.AccountSetupBasics.provider";
private Preferences mPrefs; private Preferences mPrefs;
private EditText mEmailView; private EditText mEmailView;
@ -262,7 +262,7 @@ public class AccountSetupBasics extends Activity
if (mDefaultView.isChecked()) { if (mDefaultView.isChecked()) {
Preferences.getPreferences(this).setDefaultAccount(mAccount); Preferences.getPreferences(this).setDefaultAccount(mAccount);
} }
k9.setServicesEnabled(this); Email.setServicesEnabled(this);
AccountSetupNames.actionSetNames(this, mAccount); AccountSetupNames.actionSetNames(this, mAccount);
finish(); finish();
} }
@ -361,7 +361,7 @@ public class AccountSetupBasics extends Activity
} }
} }
catch (Exception e) { 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; return null;
} }

View file

@ -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.CertificateException;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
@ -17,14 +17,14 @@ import android.widget.Button;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.mail.AuthenticationFailedException; import com.android.email.mail.AuthenticationFailedException;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.Transport; import com.android.email.mail.Transport;
import com.fsck.k9.mail.CertificateValidationException; import com.android.email.mail.CertificateValidationException;
import com.fsck.k9.mail.store.TrustManagerFactory; import com.android.email.mail.store.TrustManagerFactory;
/** /**
* Checks the given settings to make sure that they can be used to send and * Checks the given settings to make sure that they can be used to send and

View file

@ -1,4 +1,4 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
@ -13,11 +13,11 @@ import android.widget.AdapterView;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Utility; import com.android.email.Utility;
public class AccountSetupComposition extends Activity { public class AccountSetupComposition extends Activity {

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -19,10 +19,10 @@ import android.widget.EditText;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
public class AccountSetupIncoming extends Activity implements OnClickListener { public class AccountSetupIncoming extends Activity implements OnClickListener {
private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_ACCOUNT = "account";

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
@ -14,12 +14,12 @@ import android.view.View.OnClickListener;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.activity.FolderMessageList; import com.android.email.activity.FolderMessageList;
public class AccountSetupNames extends Activity implements OnClickListener { public class AccountSetupNames extends Activity implements OnClickListener {
private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_ACCOUNT = "account";
@ -89,7 +89,7 @@ public class AccountSetupNames extends Activity implements OnClickListener {
} }
mAccount.setName(mName.getText().toString()); mAccount.setName(mName.getText().toString());
mAccount.save(Preferences.getPreferences(this)); mAccount.save(Preferences.getPreferences(this));
FolderMessageList.actionHandleAccount(this, mAccount, k9.INBOX); FolderMessageList.actionHandleAccount(this, mAccount, Email.INBOX);
finish(); finish();
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
@ -11,10 +11,10 @@ import android.widget.ArrayAdapter;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.Spinner; import android.widget.Spinner;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
public class AccountSetupOptions extends Activity implements OnClickListener { public class AccountSetupOptions extends Activity implements OnClickListener {
private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_ACCOUNT = "account";
@ -115,7 +115,7 @@ public class AccountSetupOptions extends Activity implements OnClickListener {
if (mDefaultView.isChecked()) { if (mDefaultView.isChecked()) {
Preferences.getPreferences(this).setDefaultAccount(mAccount); Preferences.getPreferences(this).setDefaultAccount(mAccount);
} }
k9.setServicesEnabled(this); Email.setServicesEnabled(this);
AccountSetupNames.actionSetNames(this, mAccount); AccountSetupNames.actionSetNames(this, mAccount);
finish(); finish();
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -23,10 +23,10 @@ import android.widget.EditText;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.Utility; import com.android.email.Utility;
public class AccountSetupOutgoing extends Activity implements OnClickListener, public class AccountSetupOutgoing extends Activity implements OnClickListener,
OnCheckedChangeListener { OnCheckedChangeListener {

View file

@ -2,7 +2,7 @@
* *
*/ */
package com.fsck.k9.activity.setup; package com.android.email.activity.setup;
import android.widget.Spinner; import android.widget.Spinner;

View file

@ -15,7 +15,7 @@
* limitations under the License. * 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.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder; import org.apache.commons.codec.BinaryEncoder;

View file

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.fsck.k9.codec.binary; package com.android.email.codec.binary;
import java.io.FilterOutputStream; import java.io.FilterOutputStream;
import java.io.IOException; import java.io.IOException;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
@ -16,9 +16,9 @@ import org.apache.james.mime4j.field.address.parser.ParseException;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
public class Address { public class Address {
String mAddress; String mAddress;
@ -74,7 +74,7 @@ public class Address {
Mailbox mailbox = (Mailbox)address; Mailbox mailbox = (Mailbox)address;
addresses.add(new Address(mailbox.getLocalPart() + "@" + mailbox.getDomain())); addresses.add(new Address(mailbox.getLocalPart() + "@" + mailbox.getDomain()));
} else { } else {
Log.e(k9.LOG_TAG, "Unknown address type from Mime4J: " Log.e(Email.LOG_TAG, "Unknown address type from Mime4J: "
+ address.getClass().toString()); + address.getClass().toString());
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public class AuthenticationFailedException extends MessagingException { public class AuthenticationFailedException extends MessagingException {
public static final long serialVersionUID = -1; public static final long serialVersionUID = -1;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public abstract class BodyPart implements Part { public abstract class BodyPart implements Part {
protected Multipart mParent; protected Multipart mParent;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public class CertificateValidationException extends MessagingException { public class CertificateValidationException extends MessagingException {
public static final long serialVersionUID = -1; public static final long serialVersionUID = -1;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
/** /**
* Flags that can be applied to Messages. * Flags that can be applied to Messages.

View file

@ -1,4 +1,4 @@
package com.fsck.k9.mail; package com.android.email.mail;
public abstract class Folder { public abstract class Folder {

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.util.Date; import java.util.Date;
import java.util.HashSet; import java.util.HashSet;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.util.Comparator; import java.util.Comparator;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public interface MessageRetrievalListener { public interface MessageRetrievalListener {
public void messageStarted(String uid, int number, int ofTotal); public void messageStarted(String uid, int number, int ofTotal);

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public class MessagingException extends Exception { public class MessagingException extends Exception {
public static final long serialVersionUID = -1; public static final long serialVersionUID = -1;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
public class NoSuchProviderException extends MessagingException { public class NoSuchProviderException extends MessagingException {
public static final long serialVersionUID = -1; public static final long serialVersionUID = -1;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View file

@ -1,14 +1,14 @@
package com.fsck.k9.mail; package com.android.email.mail;
import java.util.HashMap; import java.util.HashMap;
import android.app.Application; import android.app.Application;
import com.fsck.k9.mail.store.ImapStore; import com.android.email.mail.store.ImapStore;
import com.fsck.k9.mail.store.LocalStore; import com.android.email.mail.store.LocalStore;
import com.fsck.k9.mail.store.Pop3Store; import com.android.email.mail.store.Pop3Store;
import com.fsck.k9.mail.store.WebDavStore; import com.android.email.mail.store.WebDavStore;
/** /**
* Store is the access point for an email message store. It's location can be * Store is the access point for an email message store. It's location can be

View file

@ -1,8 +1,8 @@
package com.fsck.k9.mail; package com.android.email.mail;
import com.fsck.k9.mail.transport.SmtpTransport; import com.android.email.mail.transport.SmtpTransport;
import com.fsck.k9.mail.transport.WebDavTransport; import com.android.email.mail.transport.WebDavTransport;
public abstract class Transport { public abstract class Transport {
protected static final int SOCKET_CONNECT_TIMEOUT = 10000; protected static final int SOCKET_CONNECT_TIMEOUT = 10000;

View file

@ -1,4 +1,4 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -13,10 +13,10 @@ import org.apache.commons.io.IOUtils;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.codec.binary.Base64OutputStream; import com.android.email.codec.binary.Base64OutputStream;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
/** /**
* A Body that is backed by a temp file. The Body exposes a getOutputStream method that allows * A Body that is backed by a temp file. The Body exposes a getOutputStream method that allows

View file

@ -1,14 +1,14 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.BodyPart; import com.android.email.mail.BodyPart;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
/** /**
* TODO this is a close approximation of Message, need to update along with * 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 { public void setBody(Body body) throws MessagingException {
this.mBody = body; this.mBody = body;
if (body instanceof com.fsck.k9.mail.Multipart) { if (body instanceof com.android.email.mail.Multipart) {
com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); com.android.email.mail.Multipart multipart = ((com.android.email.mail.Multipart)body);
multipart.setParent(this); multipart.setParent(this);
setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType()); setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType());
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; import java.io.IOException;
@ -7,8 +7,8 @@ import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.util.ArrayList; import java.util.ArrayList;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
public class MimeHeader { public class MimeHeader {
/** /**

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; 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.DateTimeField;
import org.apache.james.mime4j.field.Field; import org.apache.james.mime4j.field.Field;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.BodyPart; import com.android.email.mail.BodyPart;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
/** /**
* An implementation of Message that stores all of it's metadata in RFC 822 and * 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 { public void setBody(Body body) throws MessagingException {
this.mBody = body; this.mBody = body;
if (body instanceof com.fsck.k9.mail.Multipart) { if (body instanceof com.android.email.mail.Multipart) {
com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); com.android.email.mail.Multipart multipart = ((com.android.email.mail.Multipart)body);
multipart.setParent(this); multipart.setParent(this);
setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType()); setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType());
setHeader("MIME-Version", "1.0"); setHeader("MIME-Version", "1.0");

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; import java.io.IOException;
@ -7,9 +7,9 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import com.fsck.k9.mail.BodyPart; import com.android.email.mail.BodyPart;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Multipart; import com.android.email.mail.Multipart;
public class MimeMultipart extends Multipart { public class MimeMultipart extends Multipart {
protected String mPreamble; protected String mPreamble;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
@ -17,13 +17,13 @@ import org.apache.james.mime4j.decoder.QuotedPrintableInputStream;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.BodyPart; import com.android.email.mail.BodyPart;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Multipart; import com.android.email.mail.Multipart;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
public class MimeUtility { 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 * 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. * 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; return null;
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.internet; package com.android.email.mail.internet;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
@ -8,9 +8,9 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import com.fsck.k9.codec.binary.Base64; import com.android.email.codec.binary.Base64;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
public class TextBody implements Body { public class TextBody implements Body {
String mBody; String mBody;

View file

@ -2,7 +2,7 @@
* *
*/ */
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -14,10 +14,10 @@ import java.util.Date;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.FixedLengthInputStream; import com.android.email.FixedLengthInputStream;
import com.fsck.k9.PeekableInputStream; import com.android.email.PeekableInputStream;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
public class ImapResponseParser { public class ImapResponseParser {
SimpleDateFormat mDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss Z"); SimpleDateFormat mDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss Z");
@ -55,8 +55,8 @@ public class ImapResponseParser {
readTokens(response); readTokens(response);
} }
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, "<<< " + response.toString()); Log.d(Email.LOG_TAG, "<<< " + response.toString());
} }
} }
return response; return response;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
@ -31,28 +31,28 @@ import javax.net.ssl.SSLException;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.PeekableInputStream; import com.android.email.PeekableInputStream;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.AuthenticationFailedException; import com.android.email.mail.AuthenticationFailedException;
import com.fsck.k9.mail.FetchProfile; import com.android.email.mail.FetchProfile;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessageRetrievalListener; import com.android.email.mail.MessageRetrievalListener;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.CertificateValidationException; import com.android.email.mail.CertificateValidationException;
import com.fsck.k9.mail.internet.MimeBodyPart; import com.android.email.mail.internet.MimeBodyPart;
import com.fsck.k9.mail.internet.MimeHeader; import com.android.email.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
import com.fsck.k9.mail.internet.MimeMultipart; import com.android.email.mail.internet.MimeMultipart;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.ImapResponseParser.ImapList; import com.android.email.mail.store.ImapResponseParser.ImapList;
import com.fsck.k9.mail.store.ImapResponseParser.ImapResponse; import com.android.email.mail.store.ImapResponseParser.ImapResponse;
import com.fsck.k9.mail.transport.CountingOutputStream; import com.android.email.mail.transport.CountingOutputStream;
import com.fsck.k9.mail.transport.EOLConvertingOutputStream; import com.android.email.mail.transport.EOLConvertingOutputStream;
import com.beetstra.jutf7.CharsetProvider; import com.beetstra.jutf7.CharsetProvider;
/** /**
@ -192,7 +192,7 @@ public class ImapStore extends Store {
if(mPathDelimeter == null){ mPathDelimeter = response.getString(2); } if(mPathDelimeter == null){ mPathDelimeter = response.getString(2); }
if (folder.equalsIgnoreCase(k9.INBOX)) { if (folder.equalsIgnoreCase(Email.INBOX)) {
continue; continue;
}else{ }else{
if(mPathPrefix.length() > 0){ if(mPathPrefix.length() > 0){
@ -314,7 +314,7 @@ public class ImapStore extends Store {
public String getPrefixedName() { public String getPrefixedName() {
String prefixedName = ""; String prefixedName = "";
if(mPathPrefix.length() > 0 && !mName.equalsIgnoreCase(k9.INBOX)){ if(mPathPrefix.length() > 0 && !mName.equalsIgnoreCase(Email.INBOX)){
prefixedName += mPathPrefix + mPathDelimeter; prefixedName += mPathPrefix + mPathDelimeter;
} }
@ -742,7 +742,7 @@ public class ImapStore extends Store {
} }
catch (MessagingException e) { catch (MessagingException e) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "Error handling message", e); Log.v(Email.LOG_TAG, "Error handling message", e);
} }
message.setBody(null); message.setBody(null);
} }
@ -1226,12 +1226,12 @@ public class ImapStore extends Store {
mOut.write('\n'); mOut.write('\n');
mOut.flush(); mOut.flush();
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
if (sensitive && !k9.DEBUG_SENSITIVE) { if (sensitive && !Email.DEBUG_SENSITIVE) {
Log.d(k9.LOG_TAG, ">>> " Log.d(Email.LOG_TAG, ">>> "
+ "[Command Hidden, Enable Sensitive Debug Logging To Show]"); + "[Command Hidden, Enable Sensitive Debug Logging To Show]");
} else { } else {
Log.d(k9.LOG_TAG, ">>> " + commandToSend); Log.d(Email.LOG_TAG, ">>> " + commandToSend);
} }
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
@ -25,27 +25,27 @@ import android.net.Uri;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.codec.binary.Base64OutputStream; import com.android.email.codec.binary.Base64OutputStream;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.Body; import com.android.email.mail.Body;
import com.fsck.k9.mail.FetchProfile; import com.android.email.mail.FetchProfile;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessageRetrievalListener; import com.android.email.mail.MessageRetrievalListener;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Part; import com.android.email.mail.Part;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.internet.MimeBodyPart; import com.android.email.mail.internet.MimeBodyPart;
import com.fsck.k9.mail.internet.MimeHeader; import com.android.email.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
import com.fsck.k9.mail.internet.MimeMultipart; import com.android.email.mail.internet.MimeMultipart;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.fsck.k9.mail.internet.TextBody; import com.android.email.mail.internet.TextBody;
import com.fsck.k9.provider.AttachmentProvider; import com.android.email.provider.AttachmentProvider;
/** /**
* <pre> * <pre>
@ -98,7 +98,7 @@ public class LocalStore extends Store {
if (mDb.getVersion() < 18) { if (mDb.getVersion() < 18) {
if (Config.LOGV) { 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)); .getVersion(), 18));
} }
mDb.execSQL("DROP TABLE IF EXISTS folders"); mDb.execSQL("DROP TABLE IF EXISTS folders");
@ -242,7 +242,7 @@ public class LocalStore extends Store {
} }
public void resetVisibleLimits() { public void resetVisibleLimits() {
resetVisibleLimits(k9.DEFAULT_VISIBLE_LIMIT); resetVisibleLimits(Email.DEFAULT_VISIBLE_LIMIT);
} }
public void resetVisibleLimits(int visibleLimit) { 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[] { mDb.execSQL("INSERT INTO folders (name, visible_limit) VALUES (?, ?)", new Object[] {
mName, mName,
k9.DEFAULT_VISIBLE_LIMIT Email.DEFAULT_VISIBLE_LIMIT
}); });
return true; return true;
} }
@ -1141,7 +1141,7 @@ public class LocalStore extends Store {
} }
} }
catch (MessagingException me) { 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); me);
throw new RuntimeException(me); throw new RuntimeException(me);
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
@ -24,19 +24,19 @@ import javax.net.ssl.SSLException;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.AuthenticationFailedException; import com.android.email.mail.AuthenticationFailedException;
import com.fsck.k9.mail.FetchProfile; import com.android.email.mail.FetchProfile;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessageRetrievalListener; import com.android.email.mail.MessageRetrievalListener;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.CertificateValidationException; import com.android.email.mail.CertificateValidationException;
import com.fsck.k9.mail.Folder.OpenMode; import com.android.email.mail.Folder.OpenMode;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
public class Pop3Store extends Store { public class Pop3Store extends Store {
public static final int CONNECTION_SECURITY_NONE = 0; public static final int CONNECTION_SECURITY_NONE = 0;
@ -736,8 +736,8 @@ public class Pop3Store extends Store {
} while ((d = mIn.read()) != -1); } while ((d = mIn.read()) != -1);
String ret = sb.toString(); String ret = sb.toString();
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, "<<< " + ret); Log.d(Email.LOG_TAG, "<<< " + ret);
} }
} }
return ret; return ret;
@ -745,8 +745,8 @@ public class Pop3Store extends Store {
private void writeLine(String s) throws IOException { private void writeLine(String s) throws IOException {
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, ">>> " + s); Log.d(Email.LOG_TAG, ">>> " + s);
} }
} }
mOut.write(s.getBytes()); mOut.write(s.getBytes());

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import android.util.Log; import android.util.Log;
import android.app.Application; import android.app.Application;
@ -18,7 +18,7 @@ import java.security.cert.CertificateException;
import javax.net.ssl.X509TrustManager; import javax.net.ssl.X509TrustManager;
import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManager;
import com.fsck.k9.k9; import com.android.email.Email;
public final class TrustManagerFactory { public final class TrustManagerFactory {
private static final String LOG_TAG = "TrustManagerFactory"; private static final String LOG_TAG = "TrustManagerFactory";
@ -104,7 +104,7 @@ public final class TrustManagerFactory {
static { static {
try { try {
javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance("X509"); 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"); keyStoreFile = new File(app.getDir("KeyStore", Context.MODE_PRIVATE) + File.separator + "KeyStore.bks");
keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
//TODO: read store from disk. //TODO: read store from disk.

View file

@ -1,4 +1,4 @@
package com.fsck.k9.mail.store; package com.android.email.mail.store;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -23,17 +23,17 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.mail.FetchProfile; import com.android.email.mail.FetchProfile;
import com.fsck.k9.mail.Flag; import com.android.email.mail.Flag;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessageRetrievalListener; import com.android.email.mail.MessageRetrievalListener;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Store; import com.android.email.mail.Store;
import com.fsck.k9.mail.internet.MimeBodyPart; import com.android.email.mail.internet.MimeBodyPart;
import com.fsck.k9.mail.internet.MimeMessage; import com.android.email.mail.internet.MimeMessage;
import com.fsck.k9.mail.internet.TextBody; import com.android.email.mail.internet.TextBody;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
@ -150,7 +150,7 @@ public class WebDavStore extends Store {
@Override @Override
public void checkSettings() throws MessagingException { public void checkSettings() throws MessagingException {
Log.e(k9.LOG_TAG, "WebDavStore.checkSettings() not implemented"); Log.e(Email.LOG_TAG, "WebDavStore.checkSettings() not implemented");
} }
@Override @Override
@ -220,7 +220,7 @@ public class WebDavStore extends Store {
String fullPathName = ""; String fullPathName = "";
WebDavFolder wdFolder; WebDavFolder wdFolder;
if (folderName.equalsIgnoreCase(k9.INBOX)) { if (folderName.equalsIgnoreCase(Email.INBOX)) {
folderName = "INBOX"; folderName = "INBOX";
} else { } else {
for (int j = 5, count = urlParts.length; j < count; j++) { 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"))); //folderList.add(getFolder(java.net.URLDecoder.decode(folderName, "UTF-8")));
} }
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "Error with SAXParser " + se); Log.e(Email.LOG_TAG, "Error with SAXParser " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "Error with SAXParser " + pce); Log.e(Email.LOG_TAG, "Error with SAXParser " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "Error with encoding " + uee); Log.e(Email.LOG_TAG, "Error with encoding " + uee);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "IOException " + ioe); Log.e(Email.LOG_TAG, "IOException " + ioe);
} }
return folderList.toArray(new WebDavFolder[] {}); return folderList.toArray(new WebDavFolder[] {});
@ -412,7 +412,7 @@ public class WebDavStore extends Store {
try { try {
this.mAuthCookies = doAuthentication(this.mUsername, this.mPassword, this.mUrl); this.mAuthCookies = doAuthentication(this.mUsername, this.mPassword, this.mUrl);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "Error during authentication: " + ioe); Log.e(Email.LOG_TAG, "Error during authentication: " + ioe);
this.mAuthCookies = null; this.mAuthCookies = null;
} }
@ -514,7 +514,7 @@ public class WebDavStore extends Store {
} }
} catch (UnsupportedEncodingException uee) { } 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; return cookies;
} }
@ -550,7 +550,7 @@ public class WebDavStore extends Store {
try { try {
encodedName = java.net.URLEncoder.encode(name, "UTF-8"); encodedName = java.net.URLEncoder.encode(name, "UTF-8");
} catch (UnsupportedEncodingException uee) { } 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; encodedName = name;
} }
@ -647,15 +647,15 @@ public class WebDavStore extends Store {
istream.close(); istream.close();
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "SAXException in getMessageCount " + se); Log.e(Email.LOG_TAG, "SAXException in getMessageCount " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessageCount " + pce); Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessageCount " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "IOException in getMessageCount() " + ioe); Log.e(Email.LOG_TAG, "IOException in getMessageCount() " + ioe);
} }
return messageCount; return messageCount;
} }
@ -807,15 +807,15 @@ public class WebDavStore extends Store {
} }
} }
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "SAXException in getMessages() " + se); Log.e(Email.LOG_TAG, "SAXException in getMessages() " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessages() " + pce); Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "IOException: " + ioe); Log.e(Email.LOG_TAG, "IOException: " + ioe);
} }
return messages.toArray(new Message[] {}); return messages.toArray(new Message[] {});
@ -911,15 +911,15 @@ public class WebDavStore extends Store {
dataset = myHandler.getDataSet(); dataset = myHandler.getDataSet();
uidToUrl = dataset.getUidToUrl(); uidToUrl = dataset.getUidToUrl();
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "SAXException in getMessages() " + se); Log.e(Email.LOG_TAG, "SAXException in getMessages() " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "ParserConfigurationException in getMessages() " + pce); Log.e(Email.LOG_TAG, "ParserConfigurationException in getMessages() " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "IOException: " + ioe); Log.e(Email.LOG_TAG, "IOException: " + ioe);
} }
return uidToUrl; return uidToUrl;
@ -1047,11 +1047,11 @@ public class WebDavStore extends Store {
} }
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
Log.e(k9.LOG_TAG, "IllegalArgumentException caught " + iae); Log.e(Email.LOG_TAG, "IllegalArgumentException caught " + iae);
} catch (URISyntaxException use) { } catch (URISyntaxException use) {
Log.e(k9.LOG_TAG, "URISyntaxException caught " + use); Log.e(Email.LOG_TAG, "URISyntaxException caught " + use);
} catch (IOException ioe) { } 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(); dataset = myHandler.getDataSet();
uidToReadStatus = dataset.getUidToRead(); uidToReadStatus = dataset.getUidToRead();
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "SAXException in fetch() " + se); Log.e(Email.LOG_TAG, "SAXException in fetch() " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "ParserConfigurationException in fetch() " + pce); Log.e(Email.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } 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++) { for (int i = 0, count = messages.length; i < count; i++) {
@ -1247,15 +1247,15 @@ public class WebDavStore extends Store {
dataset = myHandler.getDataSet(); dataset = myHandler.getDataSet();
envelopes = dataset.getMessageEnvelopes(); envelopes = dataset.getMessageEnvelopes();
} catch (SAXException se) { } catch (SAXException se) {
Log.e(k9.LOG_TAG, "SAXException in fetch() " + se); Log.e(Email.LOG_TAG, "SAXException in fetch() " + se);
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
Log.e(k9.LOG_TAG, "ParserConfigurationException in fetch() " + pce); Log.e(Email.LOG_TAG, "ParserConfigurationException in fetch() " + pce);
} }
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.e(k9.LOG_TAG, "IOException: " + ioe); Log.e(Email.LOG_TAG, "IOException: " + ioe);
} }
int count = messages.length; int count = messages.length;
@ -1349,9 +1349,9 @@ public class WebDavStore extends Store {
entity = response.getEntity(); entity = response.getEntity();
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } 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); throw new IOException("Error deleting message url: "+urls[i]+" \nResponse Code: "+status_code);
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException: " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException: " + uee);
} catch (IOException ioe) { } 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 = java.net.URLEncoder.encode(end, "UTF-8");
end = end.replaceAll("\\+", "%20"); end = end.replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException caught in setUrl"); Log.e(Email.LOG_TAG, "UnsupportedEncodingException caught in setUrl");
} catch (IllegalArgumentException iae) { } 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++) { for (int i = 0; i < length - 1; i++) {
@ -1646,7 +1646,7 @@ public class WebDavStore extends Store {
Date parsedDate = dfInput.parse(value); Date parsedDate = dfInput.parse(value);
tempDate = dfOutput.format(parsedDate); tempDate = dfOutput.format(parsedDate);
} catch (java.text.ParseException pe) { } 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); this.mEnvelope.addHeader("Date", tempDate);
@ -1814,9 +1814,9 @@ public class WebDavStore extends Store {
end = java.net.URLEncoder.encode(end, "UTF-8"); end = java.net.URLEncoder.encode(end, "UTF-8");
end = end.replaceAll("\\+", "%20"); end = end.replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException uee) { } 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) { } 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++) { for (int i = 0; i < length - 1; i++) {

View file

@ -1,4 +1,4 @@
package com.fsck.k9.mail.transport; package com.android.email.mail.transport;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View file

@ -1,4 +1,4 @@
package com.fsck.k9.mail.transport; package com.android.email.mail.transport;
import java.io.FilterOutputStream; import java.io.FilterOutputStream;
import java.io.IOException; import java.io.IOException;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.transport; package com.android.email.mail.transport;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
@ -21,17 +21,17 @@ import javax.net.ssl.SSLException;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.PeekableInputStream; import com.android.email.PeekableInputStream;
import com.fsck.k9.codec.binary.Base64; import com.android.email.codec.binary.Base64;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.AuthenticationFailedException; import com.android.email.mail.AuthenticationFailedException;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Transport; import com.android.email.mail.Transport;
import com.fsck.k9.mail.CertificateValidationException; import com.android.email.mail.CertificateValidationException;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.store.TrustManagerFactory; import com.android.email.mail.store.TrustManagerFactory;
public class SmtpTransport extends Transport { public class SmtpTransport extends Transport {
public static final int CONNECTION_SECURITY_NONE = 0; public static final int CONNECTION_SECURITY_NONE = 0;
@ -150,8 +150,8 @@ public class SmtpTransport extends Transport {
} }
} catch (Exception e) { } catch (Exception e) {
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, "Unable to look up localhost"); Log.d(Email.LOG_TAG, "Unable to look up localhost");
} }
} }
} }
@ -283,8 +283,8 @@ public class SmtpTransport extends Transport {
} }
String ret = sb.toString(); String ret = sb.toString();
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, "<<< " + ret); Log.d(Email.LOG_TAG, "<<< " + ret);
} }
} }
return ret; return ret;
@ -292,8 +292,8 @@ public class SmtpTransport extends Transport {
private void writeLine(String s) throws IOException { private void writeLine(String s) throws IOException {
if (Config.LOGD) { if (Config.LOGD) {
if (k9.DEBUG) { if (Email.DEBUG) {
Log.d(k9.LOG_TAG, ">>> " + s); Log.d(Email.LOG_TAG, ">>> " + s);
} }
} }
mOut.write(s.getBytes()); mOut.write(s.getBytes());

View file

@ -1,10 +1,10 @@
package com.fsck.k9.mail.transport; package com.android.email.mail.transport;
import java.io.FilterOutputStream; import java.io.FilterOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import com.fsck.k9.k9; import com.android.email.Email;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
@ -22,7 +22,7 @@ public class StatusOutputStream extends FilterOutputStream {
mCount++; mCount++;
if (Config.LOGV) { if (Config.LOGV) {
if (mCount % 1024 == 0) { if (mCount % 1024 == 0) {
Log.v(k9.LOG_TAG, "# " + mCount); Log.v(Email.LOG_TAG, "# " + mCount);
} }
} }
} }

View file

@ -1,5 +1,5 @@
package com.fsck.k9.mail.transport; package com.android.email.mail.transport;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
@ -37,22 +37,22 @@ import org.xml.sax.XMLReader;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.PeekableInputStream; import com.android.email.PeekableInputStream;
import com.fsck.k9.codec.binary.Base64; import com.android.email.codec.binary.Base64;
import com.fsck.k9.mail.Address; import com.android.email.mail.Address;
import com.fsck.k9.mail.AuthenticationFailedException; import com.android.email.mail.AuthenticationFailedException;
import com.fsck.k9.mail.Folder; import com.android.email.mail.Folder;
import com.fsck.k9.mail.Message; import com.android.email.mail.Message;
import com.fsck.k9.mail.MessagingException; import com.android.email.mail.MessagingException;
import com.fsck.k9.mail.Transport; import com.android.email.mail.Transport;
import com.fsck.k9.mail.CertificateValidationException; import com.android.email.mail.CertificateValidationException;
import com.fsck.k9.mail.Message.RecipientType; import com.android.email.mail.Message.RecipientType;
import com.fsck.k9.mail.store.TrustManagerFactory; import com.android.email.mail.store.TrustManagerFactory;
import com.fsck.k9.mail.store.WebDavStore; import com.android.email.mail.store.WebDavStore;
import com.fsck.k9.mail.store.WebDavStore.HttpGeneric; import com.android.email.mail.store.WebDavStore.HttpGeneric;
import com.fsck.k9.mail.store.WebDavStore.ParsedDataSet; import com.android.email.mail.store.WebDavStore.ParsedDataSet;
import com.fsck.k9.mail.store.WebDavStore.WebDavHandler; import com.android.email.mail.store.WebDavStore.WebDavHandler;
public class WebDavTransport extends Transport { public class WebDavTransport extends Transport {
public static final int CONNECTION_SECURITY_NONE = 0; public static final int CONNECTION_SECURITY_NONE = 0;
@ -85,11 +85,11 @@ public class WebDavTransport extends Transport {
*/ */
public WebDavTransport(String _uri) throws MessagingException { public WebDavTransport(String _uri) throws MessagingException {
store = new WebDavStore(_uri); 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 { 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()) { if (store.needAuth()) {
store.authenticate(); store.authenticate();
} }
@ -116,7 +116,7 @@ public class WebDavTransport extends Transport {
} }
public void sendMessage(Message message) throws MessagingException { 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(); DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGeneric httpmethod; HttpGeneric httpmethod;
@ -130,13 +130,13 @@ public class WebDavTransport extends Transport {
try { try {
subject = message.getSubject(); subject = message.getSubject();
} catch (MessagingException e) { } catch (MessagingException e) {
Log.e(k9.LOG_TAG, "MessagingException while retrieving Subject: " + e); Log.e(Email.LOG_TAG, "MessagingException while retrieving Subject: " + e);
subject = ""; subject = "";
} }
try { try {
out = new ByteArrayOutputStream(message.getSize()); out = new ByteArrayOutputStream(message.getSize());
} catch (MessagingException e) { } 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(); out = new ByteArrayOutputStream();
} }
open(); open();
@ -178,12 +178,12 @@ public class WebDavTransport extends Transport {
} }
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
Log.e(k9.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee); Log.e(Email.LOG_TAG, "UnsupportedEncodingException in getMessageCount() " + uee);
} catch (IOException ioe) { } 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); throw new MessagingException("Unable to send message", ioe);
} }
Log.d(k9.LOG_TAG, ">>> getMessageCount finished"); Log.d(Email.LOG_TAG, ">>> getMessageCount finished");
} }
} }

View file

@ -1,4 +1,4 @@
package com.fsck.k9.provider; package com.android.email.provider;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -21,16 +21,16 @@ import android.provider.OpenableColumns;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.Utility; import com.android.email.Utility;
import com.fsck.k9.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
/* /*
* A simple ContentProvider that allows file access to Email's attachments. * A simple ContentProvider that allows file access to Email's attachments.
*/ */
public class AttachmentProvider extends ContentProvider { 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_RAW = "RAW";
private static final String FORMAT_THUMBNAIL = "THUMBNAIL"; private static final String FORMAT_THUMBNAIL = "THUMBNAIL";

View file

@ -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.BroadcastReceiver;
import android.content.Context; import android.content.Context;

View file

@ -1,5 +1,5 @@
package com.fsck.k9.service; package com.android.email.service;
import java.util.HashMap; import java.util.HashMap;
@ -17,21 +17,21 @@ import android.util.Log;
import android.text.TextUtils; import android.text.TextUtils;
import android.net.Uri; import android.net.Uri;
import com.fsck.k9.Account; import com.android.email.Account;
import com.fsck.k9.k9; import com.android.email.Email;
import com.fsck.k9.MessagingController; import com.android.email.MessagingController;
import com.fsck.k9.MessagingListener; import com.android.email.MessagingListener;
import com.fsck.k9.Preferences; import com.android.email.Preferences;
import com.fsck.k9.R; import com.android.email.R;
import com.fsck.k9.activity.Accounts; import com.android.email.activity.Accounts;
import com.fsck.k9.activity.FolderMessageList; import com.android.email.activity.FolderMessageList;
/** /**
*/ */
public class MailService extends Service { 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_CHECK_MAIL = "com.android.email.intent.action.MAIL_SERVICE_WAKEUP";
private static final String ACTION_RESCHEDULE = "com.fsck.k9.intent.action.MAIL_SERVICE_RESCHEDULE"; private static final String ACTION_RESCHEDULE = "com.android.email.intent.action.MAIL_SERVICE_RESCHEDULE";
private static final String ACTION_CANCEL = "com.fsck.k9.intent.action.MAIL_SERVICE_CANCEL"; private static final String ACTION_CANCEL = "com.android.email.intent.action.MAIL_SERVICE_CANCEL";
private Listener mListener = new Listener(); private Listener mListener = new Listener();
@ -59,20 +59,20 @@ public class MailService extends Service {
MessagingController.getInstance(getApplication()).addListener(mListener); MessagingController.getInstance(getApplication()).addListener(mListener);
if (ACTION_CHECK_MAIL.equals(intent.getAction())) { if (ACTION_CHECK_MAIL.equals(intent.getAction())) {
if (Config.LOGV) { 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); MessagingController.getInstance(getApplication()).checkMail(this, null, mListener);
} }
else if (ACTION_CANCEL.equals(intent.getAction())) { else if (ACTION_CANCEL.equals(intent.getAction())) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "***** MailService *****: cancel"); Log.v(Email.LOG_TAG, "***** MailService *****: cancel");
} }
cancel(); cancel();
stopSelf(startId); stopSelf(startId);
} }
else if (ACTION_RESCHEDULE.equals(intent.getAction())) { else if (ACTION_RESCHEDULE.equals(intent.getAction())) {
if (Config.LOGV) { if (Config.LOGV) {
Log.v(k9.LOG_TAG, "***** MailService *****: reschedule"); Log.v(Email.LOG_TAG, "***** MailService *****: reschedule");
} }
reschedule(); reschedule();
stopSelf(startId); stopSelf(startId);
@ -88,7 +88,7 @@ public class MailService extends Service {
private void cancel() { private void cancel() {
AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE); AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(); 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); i.setAction(ACTION_CHECK_MAIL);
PendingIntent pi = PendingIntent.getService(this, 0, i, 0); PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
alarmMgr.cancel(pi); alarmMgr.cancel(pi);
@ -97,7 +97,7 @@ public class MailService extends Service {
private void reschedule() { private void reschedule() {
AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE); AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(); 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); i.setAction(ACTION_CHECK_MAIL);
PendingIntent pi = PendingIntent.getService(this, 0, i, 0); PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
@ -170,7 +170,7 @@ public class MailService extends Service {
} else { } else {
Account account1 = accountsWithNewMail.keySet().iterator().next(); Account account1 = accountsWithNewMail.keySet().iterator().next();
int totalNewMails = accountsWithNewMail.get(account1); 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); PendingIntent pi = PendingIntent.getActivity(context, 0, i, 0);
notif.setLatestEventInfo(context, getString(R.string.notification_new_title), notif.setLatestEventInfo(context, getString(R.string.notification_new_title),
getString(R.string.notification_new_one_account_fmt, totalNewMails, getString(R.string.notification_new_one_account_fmt, totalNewMails,