2010-07-27 08:10:09 -04:00
|
|
|
package com.fsck.k9.crypto;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.content.Context;
|
2012-09-26 12:03:14 -04:00
|
|
|
import android.content.Intent;
|
|
|
|
import android.support.v4.app.Fragment;
|
2010-07-27 08:10:09 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-11-19 01:49:04 -05:00
|
|
|
@Override
|
|
|
|
public long[] getPublicKeyIdsFromEmail(Context context, String email) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2011-11-21 02:59:51 -05:00
|
|
|
@Override
|
|
|
|
public boolean hasSecretKeyForEmail(Context context, String email) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean hasPublicKeyForEmail(Context context, String email) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-07-27 08:10:09 -04:00
|
|
|
@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;
|
|
|
|
}
|
|
|
|
|
2012-09-26 12:03:14 -04:00
|
|
|
@Override
|
|
|
|
public boolean onDecryptActivityResult(CryptoDecryptCallback callback, int requestCode,
|
|
|
|
int resultCode, Intent data, PgpData pgpData) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-07-27 08:10:09 -04:00
|
|
|
@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
|
2012-09-26 12:03:14 -04:00
|
|
|
public boolean decrypt(Fragment fragment, 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;
|
|
|
|
}
|
|
|
|
}
|