Search in sources :

Example 6 with IdentityKeyParcelable

use of org.thoughtcrime.securesms.crypto.IdentityKeyParcelable in project Signal-Android by signalapp.

the class VerifySpan method onClick.

@Override
public void onClick(View widget) {
    Intent intent = new Intent(context, VerifyIdentityActivity.class);
    intent.putExtra(VerifyIdentityActivity.ADDRESS_EXTRA, address);
    intent.putExtra(VerifyIdentityActivity.IDENTITY_EXTRA, new IdentityKeyParcelable(identityKey));
    intent.putExtra(VerifyIdentityActivity.VERIFIED_EXTRA, false);
    context.startActivity(intent);
}
Also used : IdentityKeyParcelable(org.thoughtcrime.securesms.crypto.IdentityKeyParcelable) Intent(android.content.Intent)

Example 7 with IdentityKeyParcelable

use of org.thoughtcrime.securesms.crypto.IdentityKeyParcelable in project Signal-Android by signalapp.

the class VerifyIdentityActivity method onCreate.

@Override
protected void onCreate(Bundle state, boolean ready) {
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle(R.string.AndroidManifest__verify_safety_number);
    Recipient recipient = Recipient.from(this, (Address) getIntent().getParcelableExtra(ADDRESS_EXTRA), true);
    recipient.addListener(this);
    setActionBarNotificationBarColor(recipient.getColor());
    Bundle extras = new Bundle();
    extras.putParcelable(VerifyDisplayFragment.REMOTE_ADDRESS, getIntent().getParcelableExtra(ADDRESS_EXTRA));
    extras.putParcelable(VerifyDisplayFragment.REMOTE_IDENTITY, getIntent().getParcelableExtra(IDENTITY_EXTRA));
    extras.putString(VerifyDisplayFragment.REMOTE_NUMBER, recipient.getAddress().toPhoneString());
    extras.putParcelable(VerifyDisplayFragment.LOCAL_IDENTITY, new IdentityKeyParcelable(IdentityKeyUtil.getIdentityKey(this)));
    extras.putString(VerifyDisplayFragment.LOCAL_NUMBER, TextSecurePreferences.getLocalNumber(this));
    extras.putBoolean(VerifyDisplayFragment.VERIFIED_STATE, getIntent().getBooleanExtra(VERIFIED_EXTRA, false));
    scanFragment.setScanListener(this);
    displayFragment.setClickListener(this);
    initFragment(android.R.id.content, displayFragment, dynamicLanguage.getCurrentLocale(), extras);
}
Also used : IdentityKeyParcelable(org.thoughtcrime.securesms.crypto.IdentityKeyParcelable) Bundle(android.os.Bundle) Recipient(org.thoughtcrime.securesms.recipients.Recipient)

Example 8 with IdentityKeyParcelable

use of org.thoughtcrime.securesms.crypto.IdentityKeyParcelable in project Signal-Android by signalapp.

the class VerifyIdentityActivity method newIntent.

public static Intent newIntent(@NonNull Context context, @NonNull RecipientId recipientId, @NonNull IdentityKey identityKey, boolean verified) {
    Intent intent = new Intent(context, VerifyIdentityActivity.class);
    intent.putExtra(RECIPIENT_EXTRA, recipientId);
    intent.putExtra(IDENTITY_EXTRA, new IdentityKeyParcelable(identityKey));
    intent.putExtra(VERIFIED_EXTRA, verified);
    return intent;
}
Also used : IdentityKeyParcelable(org.thoughtcrime.securesms.crypto.IdentityKeyParcelable) Intent(android.content.Intent)

Aggregations

IdentityKeyParcelable (org.thoughtcrime.securesms.crypto.IdentityKeyParcelable)8 Intent (android.content.Intent)6 Bundle (android.os.Bundle)4 Recipient (org.thoughtcrime.securesms.recipients.Recipient)4 TypeEvaluator (android.animation.TypeEvaluator)2 ValueAnimator (android.animation.ValueAnimator)2 ActivityNotFoundException (android.content.ActivityNotFoundException)2 Context (android.content.Context)2 Bitmap (android.graphics.Bitmap)2 BitmapFactory (android.graphics.BitmapFactory)2 Canvas (android.graphics.Canvas)2 PorterDuff (android.graphics.PorterDuff)2 BitmapDrawable (android.graphics.drawable.BitmapDrawable)2 Html (android.text.Html)2 TextUtils (android.text.TextUtils)2 LinkMovementMethod (android.text.method.LinkMovementMethod)2 ContextMenu (android.view.ContextMenu)2 LayoutInflater (android.view.LayoutInflater)2 MenuInflater (android.view.MenuInflater)2 MenuItem (android.view.MenuItem)2