mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Move database code into correct package
This commit is contained in:
parent
ba4dd24bd5
commit
12291bceb5
@ -6,8 +6,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -56,8 +54,8 @@ import com.fsck.k9.mail.internet.TextBody;
|
||||
import com.fsck.k9.mail.internet.MimeUtility.ViewableContainer;
|
||||
import com.fsck.k9.mail.store.StorageManager;
|
||||
import com.fsck.k9.mail.store.UnavailableStorageException;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.provider.AttachmentProvider;
|
||||
|
||||
public class LocalFolder extends Folder implements Serializable {
|
||||
|
@ -21,8 +21,8 @@ import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mail.internet.MimeMessage;
|
||||
import com.fsck.k9.mail.internet.MimeUtility;
|
||||
import com.fsck.k9.mail.store.UnavailableStorageException;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.WrappedException;
|
||||
|
||||
public class LocalMessage extends MimeMessage {
|
||||
|
||||
|
@ -32,9 +32,8 @@ 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.LockableDatabase;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.WrappedException;
|
||||
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;
|
||||
@ -724,6 +723,7 @@ public class LocalStore extends Store implements Serializable {
|
||||
return Utility.combine(extraFlags, ',').toUpperCase(Locale.US);
|
||||
}
|
||||
|
||||
// TODO: database should not be exposed!
|
||||
public LockableDatabase getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.fsck.k9.mail.store;
|
||||
package com.fsck.k9.mail.store.local;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@ -16,6 +16,8 @@ import android.util.Log;
|
||||
import com.fsck.k9.K9;
|
||||
import com.fsck.k9.helper.FileHelper;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.store.StorageManager;
|
||||
import com.fsck.k9.mail.store.UnavailableStorageException;
|
||||
|
||||
public class LockableDatabase {
|
||||
|
||||
@ -33,7 +35,7 @@ public class LockableDatabase {
|
||||
* <code>null</code>.
|
||||
* @return Any relevant data. Can be <code>null</code>.
|
||||
* @throws WrappedException
|
||||
* @throws UnavailableStorageException
|
||||
* @throws com.fsck.k9.mail.store.UnavailableStorageException
|
||||
*/
|
||||
T doDbWork(SQLiteDatabase db) throws WrappedException, UnavailableStorageException;
|
||||
}
|
@ -18,7 +18,6 @@ import com.fsck.k9.helper.Utility;
|
||||
import com.fsck.k9.mail.Flag;
|
||||
import com.fsck.k9.mail.Folder;
|
||||
import com.fsck.k9.mail.Message;
|
||||
import com.fsck.k9.mail.store.LockableDatabase;
|
||||
import com.fsck.k9.provider.AttachmentProvider;
|
||||
|
||||
class StoreSchemaDefinition implements LockableDatabase.SchemaDefinition {
|
||||
|
@ -10,9 +10,9 @@ import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.cache.EmailProviderCacheCursor;
|
||||
import com.fsck.k9.helper.Utility;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.store.LockableDatabase;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mail.store.local.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.mail.store.UnavailableStorageException;
|
||||
import com.fsck.k9.mail.store.local.LocalStore;
|
||||
import com.fsck.k9.search.SqlQueryBuilder;
|
||||
|
Loading…
Reference in New Issue
Block a user