aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-12 21:50:34 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-12 21:50:34 +0200
commit335fa6282764760c988cfb1df23fe62e7df26a03 (patch)
tree129d07d3ea740624ce22aca32259bbfc314a91a8 /src/main/java/de/pixart/messenger
parenta41490f28d507ffc5afc6e4f507f50d0e8cfa652 (diff)
in lack of confirm source dialog in account details only trust scanned uris
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java13
-rw-r--r--src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java1
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 3b5bb633b..1a463b18a 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -664,26 +664,27 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
@Override
protected void onStart() {
super.onStart();
+ final Intent intent = getIntent();
final int theme = findTheme();
if (this.mTheme != theme) {
recreate();
- } else if (getIntent() != null) {
+ } else if (intent != null) {
try {
- this.jidToEdit = Jid.of(getIntent().getStringExtra("jid"));
+ this.jidToEdit = Jid.of(intent.getStringExtra("jid"));
} catch (final IllegalArgumentException | NullPointerException ignored) {
this.jidToEdit = null;
}
- if (jidToEdit != null && getIntent().getData() != null) {
- final XmppUri uri = new XmppUri(getIntent().getData());
+ if (jidToEdit != null && intent.getData() != null && intent.getBooleanExtra("scanned", false)) {
+ final XmppUri uri = new XmppUri(intent.getData());
if (xmppConnectionServiceBound) {
processFingerprintVerification(uri, false);
} else {
this.pendingUri = uri;
}
}
- boolean init = getIntent().getBooleanExtra("init", false);
+ boolean init = intent.getBooleanExtra("init", false);
this.mInitMode = init || this.jidToEdit == null;
- this.messageFingerprint = getIntent().getStringExtra("fingerprint");
+ this.messageFingerprint = intent.getStringExtra("fingerprint");
if (!mInitMode) {
this.binding.accountRegisterNew.setVisibility(View.GONE);
if (getSupportActionBar() != null) {
diff --git a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
index a77303d85..51f91ab30 100644
--- a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
@@ -110,6 +110,7 @@ public class UriHandlerActivity extends AppCompatActivity {
intent.setAction(Intent.ACTION_VIEW);
intent.putExtra("jid", xmppUri.getJid().asBareJid().toString());
intent.setData(uri);
+ intent.putExtra("scanned", scanned);
} else if (xmppUri.isJidValid()) {
intent = new Intent(getApplicationContext(), StartConversationActivity.class);
intent.setAction(Intent.ACTION_VIEW);