Avoid static reference to AttachmentInfoExtractor
This commit is contained in:
parent
da2012be1d
commit
e96718f3a0
2 changed files with 6 additions and 3 deletions
|
@ -73,10 +73,10 @@ public class LocalFolder extends Folder<LocalMessage> implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = -1973296520918624767L;
|
||||
private static final int MAX_BODY_SIZE_FOR_DATABASE = 16 * 1024;
|
||||
private static final AttachmentInfoExtractor attachmentInfoExtractor = AttachmentInfoExtractor.getInstance();
|
||||
static final long INVALID_MESSAGE_PART_ID = -1;
|
||||
|
||||
private final LocalStore localStore;
|
||||
private final AttachmentInfoExtractor attachmentInfoExtractor;
|
||||
|
||||
private String mName = null;
|
||||
private long mFolderId = -1;
|
||||
|
@ -98,6 +98,7 @@ public class LocalFolder extends Folder<LocalMessage> implements Serializable {
|
|||
super();
|
||||
this.localStore = localStore;
|
||||
this.mName = name;
|
||||
attachmentInfoExtractor = localStore.attachmentInfoExtractor;
|
||||
|
||||
if (getAccount().getInboxFolderName().equals(getName())) {
|
||||
mSyncClass = FolderClass.FIRST_CLASS;
|
||||
|
@ -110,6 +111,7 @@ public class LocalFolder extends Folder<LocalMessage> implements Serializable {
|
|||
super();
|
||||
this.localStore = localStore;
|
||||
this.mFolderId = id;
|
||||
attachmentInfoExtractor = localStore.attachmentInfoExtractor;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
|
|
|
@ -48,14 +48,13 @@ import com.fsck.k9.mail.MessagingException;
|
|||
import com.fsck.k9.mail.Multipart;
|
||||
import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mail.Store;
|
||||
import com.fsck.k9.mail.internet.MimeMessage;
|
||||
import com.fsck.k9.mail.internet.MimeUtility;
|
||||
import com.fsck.k9.mailstore.LocalFolder.DataLocation;
|
||||
import com.fsck.k9.mailstore.LocalFolder.MoreMessages;
|
||||
import com.fsck.k9.mailstore.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mailstore.LockableDatabase.WrappedException;
|
||||
import com.fsck.k9.mailstore.StorageManager.StorageProvider;
|
||||
import com.fsck.k9.message.extractors.AttachmentCounter;
|
||||
import com.fsck.k9.message.extractors.AttachmentInfoExtractor;
|
||||
import com.fsck.k9.message.extractors.MessageFulltextCreator;
|
||||
import com.fsck.k9.message.extractors.MessagePreviewCreator;
|
||||
import com.fsck.k9.preferences.Storage;
|
||||
|
@ -190,6 +189,7 @@ public class LocalStore extends Store implements Serializable {
|
|||
private final MessageFulltextCreator messageFulltextCreator;
|
||||
private final AttachmentCounter attachmentCounter;
|
||||
private final PendingCommandSerializer pendingCommandSerializer;
|
||||
final AttachmentInfoExtractor attachmentInfoExtractor;
|
||||
|
||||
/**
|
||||
* local://localhost/path/to/database/uuid.db
|
||||
|
@ -209,6 +209,7 @@ public class LocalStore extends Store implements Serializable {
|
|||
messageFulltextCreator = MessageFulltextCreator.newInstance();
|
||||
attachmentCounter = AttachmentCounter.newInstance();
|
||||
pendingCommandSerializer = PendingCommandSerializer.getInstance();
|
||||
attachmentInfoExtractor = AttachmentInfoExtractor.getInstance();
|
||||
|
||||
database.open();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue