apkfuckery/com.discord/smali_classes2/org/webrtc/Logging.smali

428 lines
11 KiB
Smali

.class public Lorg/webrtc/Logging;
.super Ljava/lang/Object;
.source "Logging.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/webrtc/Logging$ExternalReporter;,
Lorg/webrtc/Logging$Severity;,
Lorg/webrtc/Logging$TraceLevel;
}
.end annotation
# static fields
.field public static externalReporter:Lorg/webrtc/Logging$ExternalReporter;
.field public static final fallbackLogger:Ljava/util/logging/Logger;
.field public static loggable:Lorg/webrtc/Loggable;
.field public static loggableSeverity:Lorg/webrtc/Logging$Severity;
.field public static volatile loggingEnabled:Z
# direct methods
.method public static constructor <clinit>()V
.locals 1
invoke-static {}, Lorg/webrtc/Logging;->createFallbackLogger()Ljava/util/logging/Logger;
move-result-object v0
sput-object v0, Lorg/webrtc/Logging;->fallbackLogger:Ljava/util/logging/Logger;
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static createFallbackLogger()Ljava/util/logging/Logger;
.locals 2
const-string v0, "org.webrtc.Logging"
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
sget-object v1, Ljava/util/logging/Level;->ALL:Ljava/util/logging/Level;
invoke-virtual {v0, v1}, Ljava/util/logging/Logger;->setLevel(Ljava/util/logging/Level;)V
return-object v0
.end method
.method public static d(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_INFO:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public static deleteInjectedLoggable()V
.locals 1
const/4 v0, 0x0
sput-object v0, Lorg/webrtc/Logging;->loggable:Lorg/webrtc/Loggable;
return-void
.end method
.method public static e(Ljava/lang/String;Ljava/lang/String;)V
.locals 2
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_ERROR:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lorg/webrtc/Logging;->externalReporter:Lorg/webrtc/Logging$ExternalReporter;
if-eqz v0, :cond_0
const/4 v1, 0x0
invoke-interface {v0, p0, p1, v1}, Lorg/webrtc/Logging$ExternalReporter;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_0
return-void
.end method
.method public static e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 2
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_ERROR:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_ERROR:Lorg/webrtc/Logging$Severity;
invoke-virtual {p2}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, p0, v1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_ERROR:Lorg/webrtc/Logging$Severity;
invoke-static {p2}, Lorg/webrtc/Logging;->getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object v1
invoke-static {v0, p0, v1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lorg/webrtc/Logging;->externalReporter:Lorg/webrtc/Logging$ExternalReporter;
if-eqz v0, :cond_0
invoke-interface {v0, p0, p1, p2}, Lorg/webrtc/Logging$ExternalReporter;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_0
return-void
.end method
.method public static enableLogThreads()V
.locals 0
invoke-static {}, Lorg/webrtc/Logging;->nativeEnableLogThreads()V
return-void
.end method
.method public static enableLogTimeStamps()V
.locals 0
invoke-static {}, Lorg/webrtc/Logging;->nativeEnableLogTimeStamps()V
return-void
.end method
.method public static declared-synchronized enableLogToDebugOutput(Lorg/webrtc/Logging$Severity;)V
.locals 2
const-class v0, Lorg/webrtc/Logging;
monitor-enter v0
:try_start_0
sget-object v1, Lorg/webrtc/Logging;->loggable:Lorg/webrtc/Loggable;
if-nez v1, :cond_0
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
move-result p0
invoke-static {p0}, Lorg/webrtc/Logging;->nativeEnableLogToDebugOutput(I)V
const/4 p0, 0x1
sput-boolean p0, Lorg/webrtc/Logging;->loggingEnabled:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit v0
return-void
:cond_0
:try_start_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string v1, "Logging to native debug output not supported while Loggable is injected. Delete the Loggable before calling this method."
invoke-direct {p0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p0
monitor-exit v0
throw p0
.end method
.method public static enableTracing(Ljava/lang/String;Ljava/util/EnumSet;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/EnumSet<",
"Lorg/webrtc/Logging$TraceLevel;",
">;)V"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
return-void
.end method
.method public static getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;
.locals 2
if-nez p0, :cond_0
const-string p0, ""
return-object p0
:cond_0
new-instance v0, Ljava/io/StringWriter;
invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
new-instance v1, Ljava/io/PrintWriter;
invoke-direct {v1, v0}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V
invoke-virtual {p0, v1}, Ljava/lang/Throwable;->printStackTrace(Ljava/io/PrintWriter;)V
invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static injectLoggable(Lorg/webrtc/Loggable;Lorg/webrtc/Logging$Severity;)V
.locals 0
if-eqz p0, :cond_0
sput-object p0, Lorg/webrtc/Logging;->loggable:Lorg/webrtc/Loggable;
sput-object p1, Lorg/webrtc/Logging;->loggableSeverity:Lorg/webrtc/Logging$Severity;
:cond_0
return-void
.end method
.method public static log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
.locals 2
if-eqz p1, :cond_6
if-eqz p2, :cond_6
sget-object v0, Lorg/webrtc/Logging;->loggable:Lorg/webrtc/Loggable;
if-eqz v0, :cond_1
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
move-result v0
sget-object v1, Lorg/webrtc/Logging;->loggableSeverity:Lorg/webrtc/Logging$Severity;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
if-ge v0, v1, :cond_0
return-void
:cond_0
sget-object v0, Lorg/webrtc/Logging;->loggable:Lorg/webrtc/Loggable;
invoke-interface {v0, p2, p0, p1}, Lorg/webrtc/Loggable;->onLogMessage(Ljava/lang/String;Lorg/webrtc/Logging$Severity;Ljava/lang/String;)V
return-void
:cond_1
sget-boolean v0, Lorg/webrtc/Logging;->loggingEnabled:Z
if-eqz v0, :cond_2
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
move-result p0
invoke-static {p0, p1, p2}, Lorg/webrtc/Logging;->nativeLog(ILjava/lang/String;Ljava/lang/String;)V
return-void
:cond_2
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
move-result p0
const/4 v0, 0x2
if-eq p0, v0, :cond_5
const/4 v0, 0x3
if-eq p0, v0, :cond_4
const/4 v0, 0x4
if-eq p0, v0, :cond_3
sget-object p0, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;
goto :goto_0
:cond_3
sget-object p0, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;
goto :goto_0
:cond_4
sget-object p0, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
goto :goto_0
:cond_5
sget-object p0, Ljava/util/logging/Level;->INFO:Ljava/util/logging/Level;
:goto_0
sget-object v0, Lorg/webrtc/Logging;->fallbackLogger:Ljava/util/logging/Logger;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, ": "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p0, p1}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;)V
return-void
:cond_6
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Logging tag or message may not be null."
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static native nativeEnableLogThreads()V
.end method
.method public static native nativeEnableLogTimeStamps()V
.end method
.method public static native nativeEnableLogToDebugOutput(I)V
.end method
.method public static native nativeLog(ILjava/lang/String;Ljava/lang/String;)V
.end method
.method public static v(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_VERBOSE:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public static w(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_WARNING:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public static w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 1
sget-object v0, Lorg/webrtc/Logging$Severity;->LS_WARNING:Lorg/webrtc/Logging$Severity;
invoke-static {v0, p0, p1}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object p1, Lorg/webrtc/Logging$Severity;->LS_WARNING:Lorg/webrtc/Logging$Severity;
invoke-virtual {p2}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {p1, p0, v0}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
sget-object p1, Lorg/webrtc/Logging$Severity;->LS_WARNING:Lorg/webrtc/Logging$Severity;
invoke-static {p2}, Lorg/webrtc/Logging;->getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p2
invoke-static {p1, p0, p2}, Lorg/webrtc/Logging;->log(Lorg/webrtc/Logging$Severity;Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method