alexandroid/decompiled/jadx/sources/com/facebook/soloader/SoLoaderULErrorFactory.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

33 lines
1.5 KiB
Java

package com.facebook.soloader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@DoNotStripAny
/* loaded from: classes7.dex */
public class SoLoaderULErrorFactory {
private static boolean corruptedLibName(String str) {
Matcher matcher = Pattern.compile("\\P{ASCII}+").matcher(str);
if (!matcher.find()) {
return false;
}
LogUtil.w(SoLoader.TAG, "Library name is corrupted, contains non-ASCII characters " + matcher.group());
return true;
}
public static SoLoaderULError create(String str, UnsatisfiedLinkError unsatisfiedLinkError) {
SoLoaderULError soLoaderULError;
if (unsatisfiedLinkError.getMessage() != null && unsatisfiedLinkError.getMessage().contains("ELF")) {
LogUtil.d(SoLoader.TAG, "Corrupted lib file detected");
soLoaderULError = new SoLoaderCorruptedLibFileError(str, unsatisfiedLinkError.toString());
} else if (corruptedLibName(str)) {
LogUtil.d(SoLoader.TAG, "Corrupted lib name detected");
soLoaderULError = new SoLoaderCorruptedLibNameError(str, "corrupted lib name: " + unsatisfiedLinkError.toString());
} else {
soLoaderULError = new SoLoaderULError(str, unsatisfiedLinkError.toString());
}
soLoaderULError.initCause(unsatisfiedLinkError);
return soLoaderULError;
}
}