mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Share actual public key
This commit is contained in:
parent
32e02d1f0d
commit
858b34306b
@ -48,7 +48,9 @@ import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference;
|
||||
import org.thoughtcrime.securesms.service.KeyCachingService;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.IdentityUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.signalservice.api.SignalServiceAccountManager;
|
||||
|
||||
/**
|
||||
* The Activity for application preference display and management.
|
||||
@ -271,10 +273,12 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
|
||||
fragment = new AdvancedPreferenceFragment();
|
||||
break;
|
||||
case PREFERENCE_CATEGORY_PUBLIC_KEY:
|
||||
ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData clip = ClipData.newPlainText("public key", "public key"); // TODO: Use actual public key
|
||||
clipboard.setPrimaryClip(clip);
|
||||
Toast.makeText(getContext(), R.string.activity_settings_public_key_copied_message, Toast.LENGTH_SHORT).show();
|
||||
String hexEncodedPublicKey = TextSecurePreferences.getLocalNumber(getContext());
|
||||
Intent shareIntent = new Intent();
|
||||
shareIntent.setAction(Intent.ACTION_SEND);
|
||||
shareIntent.putExtra(Intent.EXTRA_TEXT, hexEncodedPublicKey);
|
||||
shareIntent.setType("text/plain");
|
||||
startActivity(shareIntent);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
|
@ -165,7 +165,7 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
|
||||
|
||||
log(TAG, "Have access key to use: " + unidentifiedAccess.isPresent());
|
||||
|
||||
// Loki - Generate a PreKeyBundle for a friend request.
|
||||
// Loki - Generate a pre key bundle for a friend request
|
||||
PreKeyBundle preKeyBundle = message.isFriendRequest() ? DatabaseFactory.getLokiPreKeyBundleDatabase(context).generatePreKeyBundle(address.getNumber()) : null;
|
||||
|
||||
SignalServiceDataMessage textSecureMessage = SignalServiceDataMessage.newBuilder()
|
||||
|
Loading…
x
Reference in New Issue
Block a user