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>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package com.helpshift.log;
/* loaded from: classes3.dex */
public abstract class HSLogger {
public static ILogger logger;
public static void initLogger(ILogger iLogger) {
logger = iLogger;
}
public static void d(String str, String str2) {
d(str, str2, null);
}
public static void w(String str, String str2) {
w(str, str2, null);
}
public static void e(String str, String str2) {
e(str, str2, null);
}
public static void d(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.d(str, str2, th);
}
public static void w(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.w(str, str2, th);
}
public static void e(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.e(str, str2, th);
}
}

View File

@@ -0,0 +1,17 @@
package com.helpshift.log;
/* loaded from: classes3.dex */
public interface ILogger {
public enum LEVEL {
DEBUG,
WARN,
ERROR
}
void d(String str, String str2, Throwable th);
void e(String str, String str2, Throwable th);
void w(String str, String str2, Throwable th);
}

View File

@@ -0,0 +1,73 @@
package com.helpshift.log;
import android.util.Log;
import com.helpshift.log.ILogger;
/* loaded from: classes3.dex */
public class InternalHelpshiftLogger implements ILogger {
public final boolean isAppInDebugMode;
public LogCollector logCollector;
public final boolean shouldEnableLogging;
public void setLogCollector(LogCollector logCollector) {
this.logCollector = logCollector;
}
public InternalHelpshiftLogger(boolean z, boolean z2) {
this.isAppInDebugMode = z;
this.shouldEnableLogging = z2;
}
@Override // com.helpshift.log.ILogger
public void d(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.DEBUG, str, str2, th);
}
@Override // com.helpshift.log.ILogger
public void w(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.WARN, str, str2, th);
}
@Override // com.helpshift.log.ILogger
public void e(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.ERROR, str, str2, th);
}
public final void logMessage(ILogger.LEVEL level, String str, String str2, Throwable th) {
if (this.shouldEnableLogging) {
String str3 = str + " : " + str2;
int i = AnonymousClass1.$SwitchMap$com$helpshift$log$ILogger$LEVEL[level.ordinal()];
if (i == 1) {
Log.e("Helpshift", str3, th);
} else if (i == 2) {
Log.w("Helpshift", str3, th);
}
LogCollector logCollector = this.logCollector;
if (logCollector != null) {
logCollector.collectLog("Helpshift", str3, th, level);
}
}
}
/* renamed from: com.helpshift.log.InternalHelpshiftLogger$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
public static final /* synthetic */ int[] $SwitchMap$com$helpshift$log$ILogger$LEVEL;
static {
int[] iArr = new int[ILogger.LEVEL.values().length];
$SwitchMap$com$helpshift$log$ILogger$LEVEL = iArr;
try {
iArr[ILogger.LEVEL.ERROR.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.WARN.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.DEBUG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
}

View File

@@ -0,0 +1,96 @@
package com.helpshift.log;
import android.content.Context;
import android.util.Log;
import com.helpshift.log.ILogger;
import com.helpshift.util.Utils;
import java.io.File;
import java.io.FileOutputStream;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/* loaded from: classes3.dex */
public class LogCollector {
public static final String logDirPath = "helpshift" + File.separator + "debugLogs";
public FileOutputStream fos;
public final File logFile;
public final long mainThreadId;
public final ExecutorService executorService = Executors.newSingleThreadExecutor();
public final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US);
public LogCollector(Context context, String str, long j) {
File file = new File(context.getFilesDir(), logDirPath);
file.mkdirs();
deleteOldFiles(file);
this.logFile = new File(file, str + ".txt");
this.mainThreadId = j;
}
public void collectLog(final String str, final String str2, final Throwable th, final ILogger.LEVEL level) {
final long currentTimeMillis = System.currentTimeMillis();
final long id = Thread.currentThread().getId();
if (this.fos == null) {
try {
this.fos = new FileOutputStream(this.logFile, true);
} catch (Exception e) {
Log.e("Heplshift_LogCollector", "Error opening debug log file: " + this.logFile.getAbsolutePath(), e);
return;
}
}
try {
this.executorService.submit(new Runnable() { // from class: com.helpshift.log.LogCollector.1
@Override // java.lang.Runnable
public void run() {
String stackTraceString;
try {
String format = LogCollector.this.dateFormat.format(new Date(currentTimeMillis));
StringBuilder sb = new StringBuilder();
sb.append(format);
sb.append(" ");
sb.append(LogCollector.this.mainThreadId);
sb.append("-");
sb.append(id);
sb.append(" ");
sb.append(level.name());
sb.append("/");
sb.append(str);
sb.append(" ");
sb.append(str2);
Throwable th2 = th;
if (th2 instanceof UnknownHostException) {
stackTraceString = th2.getMessage();
} else {
stackTraceString = Log.getStackTraceString(th2);
}
if (!Utils.isEmpty(stackTraceString)) {
sb.append("\n");
sb.append(stackTraceString);
}
sb.append("\n");
LogCollector.this.fos.write(sb.toString().getBytes());
} catch (Exception e2) {
Log.e("Heplshift_LogCollector", "Error writing to debug log file", e2);
}
}
});
} catch (Exception e2) {
Log.e("Heplshift_LogCollector", "Error submitting to executor", e2);
}
}
public final void deleteOldFiles(File file) {
File[] listFiles = file.listFiles();
if (listFiles == null || listFiles.length <= 5) {
return;
}
Arrays.sort(listFiles);
for (int i = 0; i < listFiles.length - 5; i++) {
listFiles[i].delete();
}
}
}

View File

@@ -0,0 +1,51 @@
package com.helpshift.log;
import android.webkit.ConsoleMessage;
/* loaded from: classes3.dex */
public abstract class WebviewConsoleLogger {
public static void log(ConsoleMessage.MessageLevel messageLevel, String str, String str2) {
if (messageLevel == null) {
HSLogger.d(str, str2);
return;
}
int i = AnonymousClass1.$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[messageLevel.ordinal()];
if (i == 1) {
HSLogger.e(str, str2);
} else if (i == 2) {
HSLogger.w(str, str2);
} else {
HSLogger.d(str, str2);
}
}
/* renamed from: com.helpshift.log.WebviewConsoleLogger$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
public static final /* synthetic */ int[] $SwitchMap$android$webkit$ConsoleMessage$MessageLevel;
static {
int[] iArr = new int[ConsoleMessage.MessageLevel.values().length];
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel = iArr;
try {
iArr[ConsoleMessage.MessageLevel.ERROR.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.WARNING.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.DEBUG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.LOG.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.TIP.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
}