From e9bf9c9369bdf1d3d4cd99c123070377ce92e504 Mon Sep 17 00:00:00 2001 From: knuthy Date: Sat, 13 Sep 2014 10:22:34 +0200 Subject: unbind when leaving activity This solves the issue where OpenKeyChain shows a dialog even if the application is hidden --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 36660a51..4dd4e7e6 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -115,6 +115,12 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB } } + @Override + public void onStop(){ + super.onStop(); + this.mServiceConnection.unbindFromService(); + } + @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. @@ -509,4 +515,9 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB } } + @Override + public void onError(Exception e) { + + } + } -- cgit v1.2.3