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;
|
|
|
|
|
2010-08-05 06:55:59 -04:00
|
|
|
/**
|
|
|
|
* Dummy CryptoProvider for when cryptography is disabled. It is never "available" and doesn't
|
|
|
|
* do anything.
|
|
|
|
*/
|
2011-02-06 17:09:48 -05:00
|
|
|
public class None extends CryptoProvider {
|
2010-07-27 08:10:09 -04:00
|
|
|
static final long serialVersionUID = 0x21071230;
|
|
|
|
public static final String NAME = "";
|
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
public static None createInstance() {
|
2010-07-27 08:10:09 -04:00
|
|
|
return new None();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean isAvailable(Context context) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean selectSecretKey(Activity activity, PgpData pgpData) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean selectEncryptionKeys(Activity activity, String emails, PgpData pgpData) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public long[] getSecretKeyIdsFromEmail(Context context, String email) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
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,
|
2011-02-06 17:09:48 -05:00
|
|
|
android.content.Intent data, PgpData pgpData) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean encrypt(Activity activity, String data, PgpData pgpData) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean decrypt(Activity activity, String data, PgpData pgpData) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-08-13 10:06:13 -04:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean isEncrypted(Message message) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-08-13 10:06:13 -04:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean isSigned(Message message) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public String getName() {
|
2010-07-27 08:10:09 -04:00
|
|
|
return NAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public boolean test(Context context) {
|
2010-07-27 08:10:09 -04:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|