- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
34 lines
1.2 KiB
Java
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!");
|
|
}
|
|
}
|