mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Move MessageCryptoAnnotations to upper level
This commit is contained in:
parent
d301efea58
commit
bb3f84fda6
@ -21,7 +21,7 @@ import com.fsck.k9.mail.internet.Viewable;
|
||||
import com.fsck.k9.mailstore.MessageViewInfo.MessageViewContainer;
|
||||
import com.fsck.k9.provider.AttachmentProvider;
|
||||
import com.fsck.k9.provider.K9FileProvider;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoHelper.MessageCryptoAnnotations;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoAnnotations;
|
||||
import org.openintents.openpgp.OpenPgpError;
|
||||
import org.openintents.openpgp.OpenPgpSignatureResult;
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.fsck.k9.ui.crypto;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mailstore.OpenPgpResultAnnotation;
|
||||
|
||||
|
||||
public class MessageCryptoAnnotations {
|
||||
private HashMap<Part, OpenPgpResultAnnotation> annotations = new HashMap<Part, OpenPgpResultAnnotation>();
|
||||
|
||||
MessageCryptoAnnotations() {
|
||||
// Package-private constructor
|
||||
}
|
||||
|
||||
void put(Part part, OpenPgpResultAnnotation annotation) {
|
||||
annotations.put(part, annotation);
|
||||
}
|
||||
|
||||
public OpenPgpResultAnnotation get(Part part) {
|
||||
return annotations.get(part);
|
||||
}
|
||||
|
||||
public boolean has(Part part) {
|
||||
return annotations.containsKey(part);
|
||||
}
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
package com.fsck.k9.ui.crypto;
|
||||
|
||||
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoHelper.MessageCryptoAnnotations;
|
||||
|
||||
|
||||
public interface MessageCryptoCallback {
|
||||
void onCryptoOperationsFinished(MessageCryptoAnnotations annotations);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import java.io.PipedInputStream;
|
||||
import java.io.PipedOutputStream;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
@ -420,23 +419,4 @@ public class MessageCryptoHelper {
|
||||
private void returnResultToFragment() {
|
||||
callback.onCryptoOperationsFinished(messageAnnotations);
|
||||
}
|
||||
|
||||
public static class MessageCryptoAnnotations {
|
||||
|
||||
private HashMap<Part,OpenPgpResultAnnotation> annotations = new HashMap<Part,OpenPgpResultAnnotation>();
|
||||
|
||||
private void put(Part part, OpenPgpResultAnnotation annotation) {
|
||||
annotations.put(part, annotation);
|
||||
}
|
||||
|
||||
public OpenPgpResultAnnotation get(Part part) {
|
||||
return annotations.get(part);
|
||||
}
|
||||
|
||||
public boolean has(Part part) {
|
||||
return annotations.containsKey(part);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import com.fsck.k9.K9;
|
||||
import com.fsck.k9.mail.Message;
|
||||
import com.fsck.k9.mailstore.LocalMessageExtractor;
|
||||
import com.fsck.k9.mailstore.MessageViewInfo;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoHelper.MessageCryptoAnnotations;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoAnnotations;
|
||||
|
||||
|
||||
public class DecodeMessageLoader extends AsyncTaskLoader<MessageViewInfo> {
|
||||
|
@ -50,7 +50,7 @@ import com.fsck.k9.ui.crypto.MessageCryptoCallback;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoHelper;
|
||||
import com.fsck.k9.ui.message.DecodeMessageLoader;
|
||||
import com.fsck.k9.ui.message.LocalMessageLoader;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoHelper.MessageCryptoAnnotations;
|
||||
import com.fsck.k9.ui.crypto.MessageCryptoAnnotations;
|
||||
import com.fsck.k9.view.MessageHeader;
|
||||
|
||||
public class MessageViewFragment extends Fragment implements ConfirmationDialogFragmentListener,
|
||||
|
Loading…
Reference in New Issue
Block a user