diff options
Diffstat (limited to 'src/eu/siacs/conversations/ui/XmppActivity.java')
-rw-r--r-- | src/eu/siacs/conversations/ui/XmppActivity.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 569563c1..6b1d1289 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -3,6 +3,8 @@ package eu.siacs.conversations.ui; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import android.app.Activity; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -63,5 +65,18 @@ public abstract class XmppActivity extends Activity { } } + public boolean hasPgp() { + if (xmppConnectionService.getPgpEngine()!=null) { + return true; + } else { + Builder builder = new AlertDialog.Builder(getApplicationContext()); + builder.setTitle("OpenKeychain not found"); + builder.setIconAttribute(android.R.attr.alertDialogIcon); + builder.setMessage("Please make sure you have installed OpenKeychain"); + builder.create().show(); + return false; + } + } + abstract void onBackendConnected(); } |