unbind when leaving activity

This solves the issue where OpenKeyChain shows a dialog even if the application is hidden
This commit is contained in:
knuthy 2014-09-13 10:22:34 +02:00
parent a690f47746
commit e9bf9c9369

View file

@ -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) {
}
}