mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Prevent crash
This commit is contained in:
@@ -544,11 +544,17 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
||||
pgpService = new OpenPgpServiceConnection(getContext(), pkg, new OpenPgpServiceConnection.OnBound() {
|
||||
@Override
|
||||
public void onBound(IOpenPgpService2 service) {
|
||||
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
return;
|
||||
|
||||
tvOpenPgpStatus.setText("Connected to " + pkg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
return;
|
||||
|
||||
if ("bindService() returned false!".equals(ex.getMessage()))
|
||||
tvOpenPgpStatus.setText("Not connected");
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user