mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
[android] Set handshake link when received via sharing intent or link click
This commit is contained in:
@@ -68,6 +68,11 @@ public class AddContactViewModel extends AndroidViewModel {
|
||||
return handshakeLink;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
String getRemoteHandshakeLink() {
|
||||
return remoteHandshakeLink;
|
||||
}
|
||||
|
||||
void setRemoteHandshakeLink(String link) {
|
||||
remoteHandshakeLink = link;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ public class LinkExchangeFragment extends BaseFragment {
|
||||
|
||||
linkInputLayout = v.findViewById(R.id.linkInputLayout);
|
||||
linkInput = v.findViewById(R.id.linkInput);
|
||||
if (viewModel.getRemoteHandshakeLink() != null) {
|
||||
// This can happen if the link was set via an incoming Intent
|
||||
linkInput.setText(viewModel.getRemoteHandshakeLink());
|
||||
}
|
||||
|
||||
clipboard = (ClipboardManager) requireNonNull(
|
||||
getContext().getSystemService(CLIPBOARD_SERVICE));
|
||||
|
||||
Reference in New Issue
Block a user