mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +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;
|
return handshakeLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
String getRemoteHandshakeLink() {
|
||||||
|
return remoteHandshakeLink;
|
||||||
|
}
|
||||||
|
|
||||||
void setRemoteHandshakeLink(String link) {
|
void setRemoteHandshakeLink(String link) {
|
||||||
remoteHandshakeLink = link;
|
remoteHandshakeLink = link;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ public class LinkExchangeFragment extends BaseFragment {
|
|||||||
|
|
||||||
linkInputLayout = v.findViewById(R.id.linkInputLayout);
|
linkInputLayout = v.findViewById(R.id.linkInputLayout);
|
||||||
linkInput = v.findViewById(R.id.linkInput);
|
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(
|
clipboard = (ClipboardManager) requireNonNull(
|
||||||
getContext().getSystemService(CLIPBOARD_SERVICE));
|
getContext().getSystemService(CLIPBOARD_SERVICE));
|
||||||
|
|||||||
Reference in New Issue
Block a user