improve logging when PGP decryption fails
This commit is contained in:
parent
30d681bcb8
commit
ea5ffe92ea
|
@ -156,7 +156,8 @@ public class PgpDecryptionService {
|
||||||
&& manager.getAutoAcceptFileSize() > 0) {
|
&& manager.getAutoAcceptFileSize() > 0) {
|
||||||
manager.createNewDownloadConnection(message);
|
manager.createNewDownloadConnection(message);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (final IOException e) {
|
||||||
|
Log.d(Config.LOGTAG,"decryption failed", e);
|
||||||
message.setEncryption(Message.ENCRYPTION_DECRYPTION_FAILED);
|
message.setEncryption(Message.ENCRYPTION_DECRYPTION_FAILED);
|
||||||
}
|
}
|
||||||
mXmppConnectionService.updateMessage(message);
|
mXmppConnectionService.updateMessage(message);
|
||||||
|
@ -170,6 +171,7 @@ public class PgpDecryptionService {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OpenPgpApi.RESULT_CODE_ERROR:
|
case OpenPgpApi.RESULT_CODE_ERROR:
|
||||||
|
Log.d(Config.LOGTAG,"decryption failed (api error)");
|
||||||
message.setEncryption(Message.ENCRYPTION_DECRYPTION_FAILED);
|
message.setEncryption(Message.ENCRYPTION_DECRYPTION_FAILED);
|
||||||
mXmppConnectionService.updateMessage(message);
|
mXmppConnectionService.updateMessage(message);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1259,7 +1259,7 @@ public class XmppConnectionService extends Service {
|
||||||
if (Config.supportOpenPgp()) {
|
if (Config.supportOpenPgp()) {
|
||||||
this.pgpServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain", new OpenPgpServiceConnection.OnBound() {
|
this.pgpServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain", new OpenPgpServiceConnection.OnBound() {
|
||||||
@Override
|
@Override
|
||||||
public void onBound(IOpenPgpService2 service) {
|
public void onBound(final IOpenPgpService2 service) {
|
||||||
for (Account account : accounts) {
|
for (Account account : accounts) {
|
||||||
final PgpDecryptionService pgp = account.getPgpDecryptionService();
|
final PgpDecryptionService pgp = account.getPgpDecryptionService();
|
||||||
if (pgp != null) {
|
if (pgp != null) {
|
||||||
|
@ -1269,7 +1269,8 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Exception e) {
|
public void onError(final Exception exception) {
|
||||||
|
Log.e(Config.LOGTAG,"could not bind to OpenKeyChain", exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.pgpServiceConnection.bindToService();
|
this.pgpServiceConnection.bindToService();
|
||||||
|
|
Loading…
Reference in a new issue