1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-15 05:55:06 -05:00
k-9/src/com/fsck/k9/crypto/None.java

86 lines
1.9 KiB
Java
Raw Normal View History

2010-07-27 08:10:09 -04:00
package com.fsck.k9.crypto;
import android.app.Activity;
import android.content.Context;
import com.fsck.k9.mail.Message;
/**
* Dummy CryptoProvider for when cryptography is disabled. It is never "available" and doesn't
* do anything.
*/
public class None extends CryptoProvider {
2010-07-27 08:10:09 -04:00
static final long serialVersionUID = 0x21071230;
public static final String NAME = "";
public static None createInstance() {
2010-07-27 08:10:09 -04:00
return new None();
}
@Override
public boolean isAvailable(Context context) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean selectSecretKey(Activity activity, PgpData pgpData) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean selectEncryptionKeys(Activity activity, String emails, PgpData pgpData) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public long[] getSecretKeyIdsFromEmail(Context context, String email) {
2010-07-27 08:10:09 -04:00
return null;
}
@Override
public long[] getPublicKeyIdsFromEmail(Context context, String email) {
return null;
}
2010-07-27 08:10:09 -04:00
@Override
public String getUserId(Context context, long keyId) {
2010-07-27 08:10:09 -04:00
return null;
}
@Override
public boolean onActivityResult(Activity activity, int requestCode, int resultCode,
android.content.Intent data, PgpData pgpData) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean encrypt(Activity activity, String data, PgpData pgpData) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean decrypt(Activity activity, String data, PgpData pgpData) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean isEncrypted(Message message) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public boolean isSigned(Message message) {
2010-07-27 08:10:09 -04:00
return false;
}
@Override
public String getName() {
2010-07-27 08:10:09 -04:00
return NAME;
}
@Override
public boolean test(Context context) {
2010-07-27 08:10:09 -04:00
return true;
}
}