Files
rr3-apk/decompiled/sources/com/helpshift/util/SchemaUtil.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

34 lines
1.2 KiB
Java

package com.helpshift.util;
import com.helpshift.HelpshiftInstallException;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
/* loaded from: classes3.dex */
public abstract class SchemaUtil {
public static final Pattern platformPattern = Pattern.compile("^[\\p{L}\\p{N}-]+_platform_\\d{17}-[0-9a-z]{15}$");
public static boolean validatePlatformId(String str) {
return Utils.isNotEmpty(str) && platformPattern.matcher(str).matches();
}
public static boolean validateDomainName(String str) {
if (Utils.isEmpty(str)) {
return false;
}
List asList = Arrays.asList(str.trim().split("\\."));
return asList.size() >= 3 && !asList.contains("");
}
public static boolean validateInstallCredentials(String str, String str2) {
if (!validateDomainName(str)) {
throw new HelpshiftInstallException("The domain name used in the Helpshift.install() is not valid!");
}
if (validatePlatformId(str2)) {
return true;
}
throw new HelpshiftInstallException("The platform id used in the Helpshift.install() is not valid!");
}
}