diff --git a/src/com/fsck/k9/Preferences.java b/src/com/fsck/k9/Preferences.java index 6504626a2..04754af97 100644 --- a/src/com/fsck/k9/Preferences.java +++ b/src/com/fsck/k9/Preferences.java @@ -13,7 +13,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.util.Log; -import com.fsck.k9.mail.Store; import com.fsck.k9.mail.store.local.LocalStore; import com.fsck.k9.preferences.Editor; import com.fsck.k9.preferences.Storage; diff --git a/src/com/fsck/k9/net/ssl/KeyChainKeyManager.java b/src/com/fsck/k9/mail/ssl/KeyChainKeyManager.java similarity index 98% rename from src/com/fsck/k9/net/ssl/KeyChainKeyManager.java rename to src/com/fsck/k9/mail/ssl/KeyChainKeyManager.java index c15fc58ad..52973e28b 100644 --- a/src/com/fsck/k9/net/ssl/KeyChainKeyManager.java +++ b/src/com/fsck/k9/mail/ssl/KeyChainKeyManager.java @@ -1,5 +1,5 @@ -package com.fsck.k9.net.ssl; +package com.fsck.k9.mail.ssl; import java.net.Socket; import java.security.Principal; @@ -29,7 +29,7 @@ import com.fsck.k9.mail.MessagingException; * For client certificate authentication! Provide private keys and certificates * during the TLS handshake using the Android 4.0 KeyChain API. */ -public class KeyChainKeyManager extends X509ExtendedKeyManager { +class KeyChainKeyManager extends X509ExtendedKeyManager { private static PrivateKey sClientCertificateReferenceWorkaround; diff --git a/src/com/fsck/k9/net/ssl/TrustManagerFactory.java b/src/com/fsck/k9/mail/ssl/TrustManagerFactory.java similarity index 99% rename from src/com/fsck/k9/net/ssl/TrustManagerFactory.java rename to src/com/fsck/k9/mail/ssl/TrustManagerFactory.java index 4e20f5c67..c1956011c 100644 --- a/src/com/fsck/k9/net/ssl/TrustManagerFactory.java +++ b/src/com/fsck/k9/mail/ssl/TrustManagerFactory.java @@ -1,5 +1,5 @@ -package com.fsck.k9.net.ssl; +package com.fsck.k9.mail.ssl; import android.util.Log; diff --git a/src/com/fsck/k9/net/ssl/TrustedSocketFactory.java b/src/com/fsck/k9/mail/ssl/TrustedSocketFactory.java similarity index 99% rename from src/com/fsck/k9/net/ssl/TrustedSocketFactory.java rename to src/com/fsck/k9/mail/ssl/TrustedSocketFactory.java index 12188f957..9d68dd205 100644 --- a/src/com/fsck/k9/net/ssl/TrustedSocketFactory.java +++ b/src/com/fsck/k9/mail/ssl/TrustedSocketFactory.java @@ -1,4 +1,4 @@ -package com.fsck.k9.net.ssl; +package com.fsck.k9.mail.ssl; import android.util.Log; diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 98c3a6833..542f78b83 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -90,7 +90,7 @@ import com.fsck.k9.mail.store.ImapResponseParser.ImapList; import com.fsck.k9.mail.store.ImapResponseParser.ImapResponse; import com.fsck.k9.mail.store.imap.ImapUtility; import com.fsck.k9.mail.transport.imap.ImapSettings; -import com.fsck.k9.net.ssl.TrustedSocketFactory; +import com.fsck.k9.mail.ssl.TrustedSocketFactory; import com.beetstra.jutf7.CharsetProvider; import com.jcraft.jzlib.JZlib; diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index 593191a14..e0b290c76 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -12,7 +12,7 @@ import com.fsck.k9.mail.*; import com.fsck.k9.mail.filter.Base64; import com.fsck.k9.mail.filter.Hex; import com.fsck.k9.mail.internet.MimeMessage; -import com.fsck.k9.net.ssl.TrustedSocketFactory; +import com.fsck.k9.mail.ssl.TrustedSocketFactory; import javax.net.ssl.SSLException; diff --git a/src/com/fsck/k9/mail/store/WebDavSocketFactory.java b/src/com/fsck/k9/mail/store/WebDavSocketFactory.java index 3557002a2..5345b41fd 100644 --- a/src/com/fsck/k9/mail/store/WebDavSocketFactory.java +++ b/src/com/fsck/k9/mail/store/WebDavSocketFactory.java @@ -4,7 +4,7 @@ import org.apache.http.conn.ConnectTimeoutException; import org.apache.http.conn.scheme.LayeredSocketFactory; import org.apache.http.params.HttpParams; -import com.fsck.k9.net.ssl.TrustManagerFactory; +import com.fsck.k9.mail.ssl.TrustManagerFactory; import java.io.IOException; import java.net.InetAddress; diff --git a/src/com/fsck/k9/mail/store/local/LocalStore.java b/src/com/fsck/k9/mail/store/local/LocalStore.java index 1aad9386a..0dded3e3f 100644 --- a/src/com/fsck/k9/mail/store/local/LocalStore.java +++ b/src/com/fsck/k9/mail/store/local/LocalStore.java @@ -1,6 +1,40 @@ package com.fsck.k9.mail.store.local; +import android.app.Application; +import android.content.ContentResolver; +import android.content.ContentValues; +import android.content.Context; +import android.content.SharedPreferences; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.net.Uri; +import android.text.TextUtils; +import android.util.Log; +import com.fsck.k9.Account; +import com.fsck.k9.K9; +import com.fsck.k9.Preferences; +import com.fsck.k9.controller.MessageRetrievalListener; +import com.fsck.k9.helper.UrlEncodingHelper; +import com.fsck.k9.helper.Utility; +import com.fsck.k9.mail.Flag; +import com.fsck.k9.mail.Folder; +import com.fsck.k9.mail.MessagingException; +import com.fsck.k9.mail.Store; +import com.fsck.k9.mail.store.RemoteStore; +import com.fsck.k9.mail.store.StorageManager; +import com.fsck.k9.mail.store.StorageManager.StorageProvider; +import com.fsck.k9.mail.store.StoreConfig; +import com.fsck.k9.mail.store.UnavailableStorageException; +import com.fsck.k9.mail.store.local.LockableDatabase.DbCallback; +import com.fsck.k9.mail.store.local.LockableDatabase.WrappedException; +import com.fsck.k9.provider.EmailProvider; +import com.fsck.k9.provider.EmailProvider.MessageColumns; +import com.fsck.k9.search.LocalSearch; +import com.fsck.k9.search.SearchSpecification.Attribute; +import com.fsck.k9.search.SearchSpecification.Searchfield; +import com.fsck.k9.search.SqlQueryBuilder; + import java.io.File; import java.io.Serializable; import java.util.ArrayList; @@ -13,41 +47,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import android.app.Application; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.SharedPreferences; -import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; -import android.net.Uri; -import android.text.TextUtils; -import android.util.Log; - -import com.fsck.k9.Account; -import com.fsck.k9.K9; -import com.fsck.k9.Preferences; -import com.fsck.k9.controller.MessageRetrievalListener; -import com.fsck.k9.helper.UrlEncodingHelper; -import com.fsck.k9.helper.Utility; -import com.fsck.k9.mail.Flag; -import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.MessagingException; -import com.fsck.k9.mail.Store; -import com.fsck.k9.mail.store.RemoteStore; -import com.fsck.k9.mail.store.StoreConfig; -import com.fsck.k9.mail.store.local.LockableDatabase.DbCallback; -import com.fsck.k9.mail.store.local.LockableDatabase.WrappedException; -import com.fsck.k9.mail.store.StorageManager; -import com.fsck.k9.mail.store.StorageManager.StorageProvider; -import com.fsck.k9.mail.store.UnavailableStorageException; -import com.fsck.k9.provider.EmailProvider; -import com.fsck.k9.provider.EmailProvider.MessageColumns; -import com.fsck.k9.search.LocalSearch; -import com.fsck.k9.search.SearchSpecification.Attribute; -import com.fsck.k9.search.SearchSpecification.Searchfield; -import com.fsck.k9.search.SqlQueryBuilder; - /** *
  * Implements a SQLite database backed local store for Messages.
@@ -209,17 +208,17 @@ public class LocalStore extends Store implements Serializable {
         }
     }
 
-    public static void removeAccount(StoreConfig storeConfig) {
+    public static void removeAccount(Account account) {
         try {
-            RemoteStore.removeInstance(storeConfig);
+            RemoteStore.removeInstance(account);
         } catch (Exception e) {
-            Log.e(K9.LOG_TAG, "Failed to reset remote store for account " + storeConfig.getUuid(), e);
+            Log.e(K9.LOG_TAG, "Failed to reset remote store for account " + account.getUuid(), e);
         }
 
         try {
-            removeInstance(storeConfig);
+            removeInstance(account);
         } catch (Exception e) {
-            Log.e(K9.LOG_TAG, "Failed to reset local store for account " + storeConfig.getUuid(), e);
+            Log.e(K9.LOG_TAG, "Failed to reset local store for account " + account.getUuid(), e);
         }
     }
 
diff --git a/src/com/fsck/k9/mail/transport/SmtpTransport.java b/src/com/fsck/k9/mail/transport/SmtpTransport.java
index a5365a33a..4e7959f7f 100644
--- a/src/com/fsck/k9/mail/transport/SmtpTransport.java
+++ b/src/com/fsck/k9/mail/transport/SmtpTransport.java
@@ -17,7 +17,7 @@ import com.fsck.k9.mail.filter.SmtpDataStuffing;
 import com.fsck.k9.mail.internet.MimeUtility;
 import com.fsck.k9.mail.store.StoreConfig;
 import com.fsck.k9.mail.store.local.LocalMessage;
-import com.fsck.k9.net.ssl.TrustedSocketFactory;
+import com.fsck.k9.mail.ssl.TrustedSocketFactory;
 
 import javax.net.ssl.SSLException;
 
diff --git a/tests/src/com/fsck/k9/net/ssl/TrustManagerFactoryTest.java b/tests/src/com/fsck/k9/mail/ssl/TrustManagerFactoryTest.java
similarity index 99%
rename from tests/src/com/fsck/k9/net/ssl/TrustManagerFactoryTest.java
rename to tests/src/com/fsck/k9/mail/ssl/TrustManagerFactoryTest.java
index 45efc0177..14da17b7f 100644
--- a/tests/src/com/fsck/k9/net/ssl/TrustManagerFactoryTest.java
+++ b/tests/src/com/fsck/k9/mail/ssl/TrustManagerFactoryTest.java
@@ -1,7 +1,8 @@
-package com.fsck.k9.net.ssl;
+package com.fsck.k9.mail.ssl;
 
 import javax.net.ssl.X509TrustManager;
 
+import com.fsck.k9.mail.ssl.TrustManagerFactory;
 import com.fsck.k9.security.LocalKeyStore;
 
 import java.io.ByteArrayInputStream;