Search in sources :

Example 6 with IOpenPgpService2

use of org.openintents.openpgp.IOpenPgpService2 in project k-9 by k9mail.

the class MessageCryptoHelper method connectToCryptoProviderService.

private void connectToCryptoProviderService() {
    openPgpServiceConnection = new OpenPgpServiceConnection(context, openPgpProvider, new OnBound() {

        @Override
        public void onBound(IOpenPgpService2 service) {
            openPgpApi = openPgpApiFactory.createOpenPgpApi(context, service);
            nextStep();
        }

        @Override
        public void onError(Exception e) {
            // TODO actually handle (hand to ui, offer retry?)
            Timber.e(e, "Couldn't connect to OpenPgpService");
        }
    });
    openPgpServiceConnection.bindToService();
}
Also used : IOpenPgpService2(org.openintents.openpgp.IOpenPgpService2) OnBound(org.openintents.openpgp.util.OpenPgpServiceConnection.OnBound) OpenPgpServiceConnection(org.openintents.openpgp.util.OpenPgpServiceConnection) IOException(java.io.IOException) MessagingException(com.fsck.k9.mail.MessagingException)

Aggregations

IOpenPgpService2 (org.openintents.openpgp.IOpenPgpService2)6 OpenPgpServiceConnection (org.openintents.openpgp.util.OpenPgpServiceConnection)5 SuppressLint (android.annotation.SuppressLint)2 Intent (android.content.Intent)2 IntentFilter (android.content.IntentFilter)2 SharedPreferences (android.content.SharedPreferences)2 Bitmap (android.graphics.Bitmap)2 SecureRandom (java.security.SecureRandom)2 CertificateException (java.security.cert.CertificateException)2 OnBound (org.openintents.openpgp.util.OpenPgpServiceConnection.OnBound)2 PendingIntent (android.app.PendingIntent)1 ParcelFileDescriptor (android.os.ParcelFileDescriptor)1 PowerManager (android.os.PowerManager)1 Account (com.fsck.k9.Account)1 MessagingException (com.fsck.k9.mail.MessagingException)1 PgpDecryptionService (de.pixart.messenger.crypto.PgpDecryptionService)1 Account (de.pixart.messenger.entities.Account)1 InvalidJidException (de.pixart.messenger.xmpp.jid.InvalidJidException)1 PgpDecryptionService (eu.siacs.conversations.crypto.PgpDecryptionService)1 Account (eu.siacs.conversations.entities.Account)1