aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/crypto/PgpEngine.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-31 16:28:21 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-31 16:28:21 +0200
commit1ac5be485502e7d6d4c117335e083c684739e6af (patch)
tree279c22e269158dde838f31ebcf3daf4272573583 /src/eu/siacs/conversations/crypto/PgpEngine.java
parent8d456085e57334dc34707a49666006619e2c77c6 (diff)
some code cleanup
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/crypto/PgpEngine.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java
index 65b7ccc77..47b1a0cbc 100644
--- a/src/eu/siacs/conversations/crypto/PgpEngine.java
+++ b/src/eu/siacs/conversations/crypto/PgpEngine.java
@@ -14,6 +14,7 @@ import org.openintents.openpgp.OpenPgpSignatureResult;
import org.openintents.openpgp.util.OpenPgpApi;
import org.openintents.openpgp.util.OpenPgpApi.IOpenPgpCallback;
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
@@ -38,7 +39,7 @@ public class PgpEngine {
public void decrypt(final Message message,
final UiCallback<Message> callback) {
- Log.d("xmppService", "decrypting message " + message.getUuid());
+ Log.d(Config.LOGTAG, "decrypting message " + message.getUuid());
Intent params = new Intent();
params.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, message
@@ -65,7 +66,7 @@ public class PgpEngine {
callback.error(R.string.openpgp_error, message);
return;
}
-
+
return;
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED:
callback.userInputRequried((PendingIntent) result
@@ -73,8 +74,9 @@ public class PgpEngine {
message);
return;
case OpenPgpApi.RESULT_CODE_ERROR:
- OpenPgpError error = result.getParcelableExtra(OpenPgpApi.RESULT_ERROR);
- Log.d("xmppService",error.getMessage());
+ OpenPgpError error = result
+ .getParcelableExtra(OpenPgpApi.RESULT_ERROR);
+ Log.d(Config.LOGTAG, error.getMessage());
callback.error(R.string.openpgp_error, message);
return;
default:
@@ -109,7 +111,8 @@ public class PgpEngine {
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
PgpEngine.this.mXmppConnectionService
.updateMessage(message);
- PgpEngine.this.mXmppConnectionService.updateConversationUi();
+ PgpEngine.this.mXmppConnectionService
+ .updateConversationUi();
callback.success(message);
return;
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED:
@@ -177,7 +180,7 @@ public class PgpEngine {
} catch (IOException e) {
callback.error(R.string.openpgp_error, message);
}
-
+
break;
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED:
callback.userInputRequried((PendingIntent) result
@@ -221,9 +224,9 @@ public class PgpEngine {
}
});
} catch (FileNotFoundException e) {
- Log.d("xmppService", "file not found: " + e.getMessage());
+ Log.d(Config.LOGTAG, "file not found: " + e.getMessage());
} catch (IOException e) {
- Log.d("xmppService", "io exception during file encrypt");
+ Log.d(Config.LOGTAG, "io exception during file encrypt");
}
}
}
@@ -267,7 +270,7 @@ public class PgpEngine {
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED:
return 0;
case OpenPgpApi.RESULT_CODE_ERROR:
- Log.d("xmppService",
+ Log.d(Config.LOGTAG,
"openpgp error: "
+ ((OpenPgpError) result
.getParcelableExtra(OpenPgpApi.RESULT_ERROR))