aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-21 13:42:25 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-21 13:42:25 +0100
commitde0b36fc7866324a48f94f3e22ac89e4f43b9ff5 (patch)
tree8fe2fec857c28df68fc002949a3c2b05411d6386 /src/main/java/eu/siacs/conversations/ui
parent92ad4cb73650b95f0888afabe60f179d282e4e06 (diff)
verify contacts key only on initiating side of smp
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java b/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
index 233a5e99..e5775ab0 100644
--- a/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
@@ -285,14 +285,21 @@ public class VerifyOTRActivity extends XmppActivity implements XmppConnectionSer
this.mStatusMessage.setVisibility(View.VISIBLE);
this.mStatusMessage.setText(R.string.secrets_do_not_match);
this.mStatusMessage.setTextColor(getWarningTextColor());
- } else if (smp.status == Conversation.Smp.STATUS_VERIFIED) {
+ } else if (smp.status == Conversation.Smp.STATUS_FINISHED) {
+ this.mSharedSecretHint.setText("");
this.mSharedSecretHint.setVisibility(View.GONE);
+ this.mSharedSecretSecret.setText("");
this.mSharedSecretSecret.setVisibility(View.GONE);
this.mStatusMessage.setVisibility(View.VISIBLE);
- this.mStatusMessage.setText(R.string.verified);
this.mStatusMessage.setTextColor(getPrimaryColor());
deactivateButton(mButtonSharedSecretNegative, R.string.cancel);
- activateButton(mButtonSharedSecretPositive, R.string.finish, mFinishListener);
+ if (mConversation.isOtrFingerprintVerified()) {
+ activateButton(mButtonSharedSecretPositive, R.string.finish, mFinishListener);
+ this.mStatusMessage.setText(R.string.verified);
+ } else {
+ activateButton(mButtonSharedSecretPositive,R.string.reset,mRetrySharedSecretListener);
+ this.mStatusMessage.setText(R.string.secret_accepted);
+ }
} else if (session != null && session.isSmpInProgress()) {
deactivateButton(mButtonSharedSecretPositive, R.string.in_progress);
activateButton(mButtonSharedSecretNegative, R.string.cancel, mCancelSharedSecretListener);