mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 18:26:57 +00:00
Add support for sgnl:// proxy deep links.
This commit is contained in:
@@ -103,11 +103,17 @@ public final class SignalProxyUtil {
|
||||
* If this is a valid proxy deep link, this will return the embedded host. If not, it will return
|
||||
* null.
|
||||
*/
|
||||
public static @Nullable String parseHostFromProxyDeepLink(@NonNull String proxyLink) {
|
||||
public static @Nullable String parseHostFromProxyDeepLink(@Nullable String proxyLink) {
|
||||
if (proxyLink == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
URI uri = new URI(proxyLink);
|
||||
|
||||
if (!"https".equalsIgnoreCase(uri.getScheme())) {
|
||||
if (!"https".equalsIgnoreCase(uri.getScheme()) &&
|
||||
!"sgnl".equalsIgnoreCase(uri.getScheme()))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user