aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-03 23:38:46 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-03 23:38:46 +0200
commit5ec3a3c508b3a4658047f4406aab2f68a63cdb80 (patch)
treef6d399f5fd4c3d06df3bf014052a1369c16be159 /src/main/java/de
parentbd711e24581408c87e2230ffb6e9d2c7518ea4c9 (diff)
reworked shortcut for QR-Code scanning in profile
fixes #190
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java35
-rw-r--r--src/main/java/de/pixart/messenger/utils/XmppUri.java2
2 files changed, 2 insertions, 35 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 681e561c9..bc1fcce7a 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -9,8 +9,6 @@ import android.content.IntentSender;
import android.content.SharedPreferences;
import android.databinding.DataBindingUtil;
import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.graphics.Point;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -75,6 +73,7 @@ import de.pixart.messenger.xmpp.XmppConnection.Features;
import de.pixart.messenger.xmpp.forms.Data;
import de.pixart.messenger.xmpp.pep.Avatar;
import rocks.xmpp.addr.Jid;
+
public class EditAccountActivity extends OmemoActivity implements OnAccountUpdate, OnUpdateBlocklist,
OnKeyStatusUpdated, OnCaptchaRequested, KeyChainAliasCallback, XmppConnectionService.OnShowErrorToast, XmppConnectionService.OnMamPreferencesFetched {
@@ -1098,22 +1097,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
Toast.LENGTH_SHORT).show();
}
});
- this.binding.actionShowQrCode.setVisibility(View.VISIBLE);
- this.binding.actionShowQrCode.setOnClickListener(v -> {
- if (otrFingerprint == null || otrFingerprint.isEmpty()) {
- return;
- }
- Point size = new Point();
- getWindowManager().getDefaultDisplay().getSize(size);
- final int width = (size.x < size.y ? size.x : size.y);
- Bitmap bitmap = BarcodeProvider.create2dBarcodeBitmap(otrFingerprint, width);
- ImageView view = new ImageView(this);
- view.setBackgroundColor(Color.WHITE);
- view.setImageBitmap(bitmap);
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setView(view);
- builder.create().show();
- });
} else {
this.binding.otrFingerprintBox.setVisibility(View.GONE);
}
@@ -1130,22 +1113,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.axolotlFingerprint.setText(CryptoHelper.prettifyFingerprint(ownAxolotlFingerprint.substring(2)));
this.binding.actionCopyAxolotlToClipboard.setVisibility(View.VISIBLE);
this.binding.actionCopyAxolotlToClipboard.setOnClickListener(v -> copyOmemoFingerprint(ownAxolotlFingerprint));
- this.binding.actionShowAxoloqrCode.setVisibility(View.VISIBLE);
- this.binding.actionShowAxoloqrCode.setOnClickListener(v -> {
- if (otrFingerprint == null || otrFingerprint.isEmpty()) {
- return;
- }
- Point size = new Point();
- getWindowManager().getDefaultDisplay().getSize(size);
- final int width = (size.x < size.y ? size.x : size.y);
- Bitmap bitmap = BarcodeProvider.create2dBarcodeBitmap(ownAxolotlFingerprint, width);
- ImageView view = new ImageView(this);
- view.setBackgroundColor(Color.WHITE);
- view.setImageBitmap(bitmap);
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setView(view);
- builder.create().show();
- });
} else {
this.binding.axolotlFingerprintBox.setVisibility(View.GONE);
}
diff --git a/src/main/java/de/pixart/messenger/utils/XmppUri.java b/src/main/java/de/pixart/messenger/utils/XmppUri.java
index db0002a29..a44c9a174 100644
--- a/src/main/java/de/pixart/messenger/utils/XmppUri.java
+++ b/src/main/java/de/pixart/messenger/utils/XmppUri.java
@@ -22,7 +22,7 @@ public class XmppUri {
private String name;
private String action;
private boolean safeSource = true;
- private static final String OMEMO_URI_PARAM = "omemo-sid-";
+ public static final String OMEMO_URI_PARAM = "omemo-sid-";
private static final String OTR_URI_PARAM = "otr-fingerprint";
public static final String ACTION_JOIN = "join";
public static final String ACTION_MESSAGE = "message";