mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-13 04:53:40 +00:00
Canonicalize numbers in fingerprint scan
Closes #5693 Closes #5646 // FREEBIE
This commit is contained in:
parent
666cdb39a4
commit
48d6d1c21d
@ -63,6 +63,7 @@ import org.whispersystems.libsignal.fingerprint.FingerprintIdentifierMismatchExc
|
|||||||
import org.whispersystems.libsignal.fingerprint.FingerprintParsingException;
|
import org.whispersystems.libsignal.fingerprint.FingerprintParsingException;
|
||||||
import org.whispersystems.libsignal.fingerprint.FingerprintVersionMismatchException;
|
import org.whispersystems.libsignal.fingerprint.FingerprintVersionMismatchException;
|
||||||
import org.whispersystems.libsignal.fingerprint.NumericFingerprintGenerator;
|
import org.whispersystems.libsignal.fingerprint.NumericFingerprintGenerator;
|
||||||
|
import org.whispersystems.signalservice.api.util.InvalidNumberException;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
@ -93,6 +94,7 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle state, @NonNull MasterSecret masterSecret) {
|
protected void onCreate(Bundle state, @NonNull MasterSecret masterSecret) {
|
||||||
|
try {
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setTitle(R.string.AndroidManifest__verify_safety_numbers);
|
getSupportActionBar().setTitle(R.string.AndroidManifest__verify_safety_numbers);
|
||||||
|
|
||||||
@ -100,7 +102,7 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||||||
|
|
||||||
Bundle extras = new Bundle();
|
Bundle extras = new Bundle();
|
||||||
extras.putParcelable(VerifyDisplayFragment.REMOTE_IDENTITY, getIntent().getParcelableExtra(RECIPIENT_IDENTITY));
|
extras.putParcelable(VerifyDisplayFragment.REMOTE_IDENTITY, getIntent().getParcelableExtra(RECIPIENT_IDENTITY));
|
||||||
extras.putString(VerifyDisplayFragment.REMOTE_NUMBER, recipient.getNumber());
|
extras.putString(VerifyDisplayFragment.REMOTE_NUMBER, Util.canonicalizeNumber(this, recipient.getNumber()));
|
||||||
extras.putParcelable(VerifyDisplayFragment.LOCAL_IDENTITY, new IdentityKeyParcelable(IdentityKeyUtil.getIdentityKey(this)));
|
extras.putParcelable(VerifyDisplayFragment.LOCAL_IDENTITY, new IdentityKeyParcelable(IdentityKeyUtil.getIdentityKey(this)));
|
||||||
extras.putString(VerifyDisplayFragment.LOCAL_NUMBER, TextSecurePreferences.getLocalNumber(this));
|
extras.putString(VerifyDisplayFragment.LOCAL_NUMBER, TextSecurePreferences.getLocalNumber(this));
|
||||||
|
|
||||||
@ -108,6 +110,10 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||||||
displayFragment.setClickListener(this);
|
displayFragment.setClickListener(this);
|
||||||
|
|
||||||
initFragment(android.R.id.content, displayFragment, masterSecret, dynamicLanguage.getCurrentLocale(), extras);
|
initFragment(android.R.id.content, displayFragment, masterSecret, dynamicLanguage.getCurrentLocale(), extras);
|
||||||
|
} catch (InvalidNumberException e) {
|
||||||
|
Log.w(TAG, e);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user