mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-28 21:57:17 +00:00
Add invalid call link dialog.
This commit is contained in:
@@ -335,9 +335,19 @@ public class CommunicationActions {
|
||||
}
|
||||
|
||||
public static void handlePotentialCallLinkUrl(@NonNull FragmentActivity activity, @NonNull String potentialUrl) {
|
||||
if (!FeatureFlags.adHocCalling()) {
|
||||
Toast.makeText(activity, R.string.CommunicationActions_cant_join_call, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
CallLinkRootKey rootKey = CallLinks.parseUrl(potentialUrl);
|
||||
if (rootKey == null) {
|
||||
Log.w(TAG, "Failed to parse root key from call link");
|
||||
new MaterialAlertDialogBuilder(activity)
|
||||
.setTitle(R.string.CommunicationActions_invalid_link)
|
||||
.setMessage(R.string.CommunicationActions_this_is_not_a_valid_call_link)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -242,6 +242,10 @@
|
||||
<string name="CommunicationActions_carrier_charges_may_apply">Carrier charges may apply. The number you are calling is not registered with Signal. This call will be placed through your mobile carrier, not over the internet.</string>
|
||||
<string name="CommunicationActions_cant_join_call">Can\'t join call</string>
|
||||
<string name="CommunicationActions_this_call_link_is_no_longer_valid">This call link is no longer valid.</string>
|
||||
<!-- Title on dialog when call link url cannot be parsed -->
|
||||
<string name="CommunicationActions_invalid_link">Invalid link</string>
|
||||
<!-- Message on dialog when call link url cannot be parsed -->
|
||||
<string name="CommunicationActions_this_is_not_a_valid_call_link">This is not a valid call link. Make sure the entire link is intact and correct before attempting to join.</string>
|
||||
|
||||
<!-- ConfirmIdentityDialog -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user