mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
91162161ad
commit
2bcf75c10d
|
@ -509,11 +509,11 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
PreferenceManager.getDefaultSharedPreferences(getContext()).unregisterOnSharedPreferenceChangeListener(this);
|
PreferenceManager.getDefaultSharedPreferences(getContext()).unregisterOnSharedPreferenceChangeListener(this);
|
||||||
|
|
||||||
if (pgpService != null && pgpService.isBound()) {
|
if (pgpService != null) {
|
||||||
Log.i("PGP unbinding");
|
Log.i("PGP unbinding");
|
||||||
pgpService.unbindFromService();
|
pgpService.unbindFromService();
|
||||||
}
|
|
||||||
pgpService = null;
|
pgpService = null;
|
||||||
|
}
|
||||||
|
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
}
|
}
|
||||||
|
@ -641,8 +641,10 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||||
private void testOpenPgp(String pkg) {
|
private void testOpenPgp(String pkg) {
|
||||||
Log.i("Testing OpenPGP pkg=" + pkg);
|
Log.i("Testing OpenPGP pkg=" + pkg);
|
||||||
try {
|
try {
|
||||||
if (pgpService != null && pgpService.isBound())
|
if (pgpService != null) {
|
||||||
pgpService.unbindFromService();
|
pgpService.unbindFromService();
|
||||||
|
pgpService = null;
|
||||||
|
}
|
||||||
|
|
||||||
tvOpenPgpStatus.setText("Connecting");
|
tvOpenPgpStatus.setText("Connecting");
|
||||||
pgpService = new OpenPgpServiceConnection(getContext(), pkg, this);
|
pgpService = new OpenPgpServiceConnection(getContext(), pkg, this);
|
||||||
|
|
Loading…
Reference in New Issue