in lack of confirm source dialog in account details only trust scanned uris
This commit is contained in:
parent
ce867758d5
commit
c41f574b1f
|
@ -3,7 +3,6 @@ package eu.siacs.conversations.ui;
|
|||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.content.SharedPreferences;
|
||||
|
@ -29,7 +28,6 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
|
@ -38,7 +36,6 @@ import android.widget.ImageView;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -67,7 +64,6 @@ import eu.siacs.conversations.ui.adapter.KnownHostsAdapter;
|
|||
import eu.siacs.conversations.ui.adapter.PresenceTemplateAdapter;
|
||||
import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;
|
||||
import eu.siacs.conversations.ui.util.PendingItem;
|
||||
import eu.siacs.conversations.ui.widget.DisabledActionModeCallback;
|
||||
import eu.siacs.conversations.utils.CryptoHelper;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import eu.siacs.conversations.utils.XmppUri;
|
||||
|
@ -638,26 +634,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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue