diff --git a/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java b/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java index ba3ae51e4..8c0592243 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java @@ -320,6 +320,10 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener Toast.makeText(activity, R.string.error_contact_address_not_found, Toast.LENGTH_LONG).show(); } + public void showErrorOpenPgpRetrieveStatus() { + Toast.makeText(activity, R.string.error_recipient_crypto_retrieve, Toast.LENGTH_LONG).show(); + } + public void showErrorOpenPgpConnection() { Toast.makeText(activity, R.string.error_crypto_provider_connect, Toast.LENGTH_LONG).show(); } diff --git a/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java b/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java index 48a44b45a..07cf0fc0a 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java @@ -19,7 +19,6 @@ import android.os.Bundle; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; import android.text.TextUtils; -import timber.log.Timber; import android.view.Menu; import com.fsck.k9.Account; @@ -29,6 +28,7 @@ import com.fsck.k9.R; import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState; import com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder; import com.fsck.k9.activity.compose.ComposeCryptoStatus.SendErrorState; +import com.fsck.k9.activity.compose.RecipientMvpView.CryptoStatusDisplayType; import com.fsck.k9.helper.Contacts; import com.fsck.k9.helper.MailTo; import com.fsck.k9.helper.ReplyToParser; @@ -47,6 +47,7 @@ import org.openintents.openpgp.util.OpenPgpApi; import org.openintents.openpgp.util.OpenPgpApi.PermissionPingCallback; import org.openintents.openpgp.util.OpenPgpServiceConnection; import org.openintents.openpgp.util.OpenPgpServiceConnection.OnBound; +import timber.log.Timber; public class RecipientPresenter implements PermissionPingCallback { @@ -392,7 +393,11 @@ public class RecipientPresenter implements PermissionPingCallback { @Override protected void onPostExecute(ComposeCryptoStatus composeCryptoStatus) { cachedCryptoStatus = composeCryptoStatus; - recipientMvpView.showCryptoStatus(composeCryptoStatus.getCryptoStatusDisplayType()); + CryptoStatusDisplayType cryptoStatusDisplayType = composeCryptoStatus.getCryptoStatusDisplayType(); + if (cryptoStatusDisplayType == CryptoStatusDisplayType.ERROR) { + recipientMvpView.showErrorOpenPgpRetrieveStatus(); + } + recipientMvpView.showCryptoStatus(cryptoStatusDisplayType); recipientMvpView.showCryptoSpecialMode(composeCryptoStatus.getCryptoSpecialModeDisplayType()); } }.execute(); diff --git a/k9mail/src/main/res/values/strings.xml b/k9mail/src/main/res/values/strings.xml index a004d6e03..384bff508 100644 --- a/k9mail/src/main/res/values/strings.xml +++ b/k9mail/src/main/res/values/strings.xml @@ -1241,4 +1241,5 @@ Please submit bug reports, contribute new features and ask questions at Loading messages… Fetching folder list failed Show Details + Error retrieving recipient status from OpenPGP provider!