aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <inputmice@siacs.eu>2015-01-02 15:14:06 +0100
committerDaniel Gultsch <inputmice@siacs.eu>2015-01-02 15:14:06 +0100
commit1988e244ef035da5ddc309c3ad587f967518509e (patch)
tree285ce0234b94519aa83e93b6c140e73bd61beeb0 /src/main/java/eu/siacs
parentf58f27a1f74ee37092aa24a1187de32fe7e903ae (diff)
some further otr improvements
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/OtrEngine.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java10
3 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
index 64434631..7f7b350c 100644
--- a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
+++ b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
@@ -126,7 +126,7 @@ public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost {
@Override
public byte[] getLocalFingerprintRaw(SessionID arg0) {
try {
- return new OtrCryptoEngineImpl().getFingerprintRaw(getPublicKey());
+ return getFingerprintRaw(getPublicKey());
} catch (OtrCryptoException e) {
return null;
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index d73af194..93a4cc7e 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -374,6 +374,8 @@ public class ConversationFragment extends Fragment {
privateMessageWith(message.getCounterpart());
}
}
+ } else {
+ activity.showQrCode();
}
}
});
diff --git a/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java b/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
index 8fffbaac..c33decd8 100644
--- a/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/VerifyOTRActivity.java
@@ -5,12 +5,11 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
+import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
-import android.widget.ImageView;
import android.widget.LinearLayout;
-import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -411,6 +410,13 @@ public class VerifyOTRActivity extends XmppActivity implements XmppConnectionSer
this.mSmpVerificationArea = (LinearLayout) findViewById(R.id.smp_verification_area);
}
+ @Override
+ public boolean onCreateOptionsMenu(final Menu menu) {
+ super.onCreateOptionsMenu(menu);
+ getMenuInflater().inflate(R.menu.verify_otr, menu);
+ return true;
+ }
+
private void showManuallyVerifyDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.manually_verify);