125 lines
2.7 KiB
Smali
125 lines
2.7 KiB
Smali
.class public Landroidx/core/util/LogWriter;
|
|
.super Ljava/io/Writer;
|
|
.source "LogWriter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
.field private final mTag:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/io/Writer;-><init>()V
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x80
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
iput-object v0, p0, Landroidx/core/util/LogWriter;->mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
iput-object p1, p0, Landroidx/core/util/LogWriter;->mTag:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private flushBuilder()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Landroidx/core/util/LogWriter;->mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/core/util/LogWriter;->mTag:Ljava/lang/String;
|
|
|
|
iget-object v1, p0, Landroidx/core/util/LogWriter;->mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
iget-object v0, p0, Landroidx/core/util/LogWriter;->mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->delete(II)Ljava/lang/StringBuilder;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public close()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroidx/core/util/LogWriter;->flushBuilder()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroidx/core/util/LogWriter;->flushBuilder()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public write([CII)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-ge v0, p3, :cond_1
|
|
|
|
add-int v1, p2, v0
|
|
|
|
aget-char v1, p1, v1
|
|
|
|
const/16 v2, 0xa
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
invoke-direct {p0}, Landroidx/core/util/LogWriter;->flushBuilder()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
iget-object v2, p0, Landroidx/core/util/LogWriter;->mBuilder:Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
:goto_1
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|