f.smali
.class public final Lsg/bigo/bigohttp/stat/f;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lsg/bigo/bigohttp/stat/NetworkStateListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lsg/bigo/bigohttp/stat/f$a;
}
.end annotation
# instance fields
.field public a:Ljava/lang/String;
.field final b:Ljava/lang/ThreadLocal;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ThreadLocal<",
"Lsg/bigo/bigohttp/stat/h;",
">;"
}
.end annotation
.end field
.field final c:Ljava/util/concurrent/ConcurrentHashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ConcurrentHashMap<",
"Ljava/lang/String;",
"Lsg/bigo/bigohttp/stat/h;",
">;"
}
.end annotation
.end field
# direct methods
.method private constructor <init>()V
.registers 2
.line 29
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string v0, "HttpStatManager"
.line 23
iput-object v0, p0, Lsg/bigo/bigohttp/stat/f;->a:Ljava/lang/String;
.line 37
new-instance v0, Ljava/lang/ThreadLocal;
invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V
iput-object v0, p0, Lsg/bigo/bigohttp/stat/f;->b:Ljava/lang/ThreadLocal;
.line 39
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
iput-object v0, p0, Lsg/bigo/bigohttp/stat/f;->c:Ljava/util/concurrent/ConcurrentHashMap;
return-void
.end method
.method synthetic constructor <init>(B)V
.registers 2
.line 22
invoke-direct {p0}, Lsg/bigo/bigohttp/stat/f;-><init>()V
return-void
.end method
.method static a(Ljava/lang/String;)Ljava/lang/String;
.registers 3
.line 53
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_18
const/16 v0, 0x3f
.line 54
invoke-virtual {p0, v0}, Ljava/lang/String;->indexOf(I)I
move-result v0
const/4 v1, 0x0
if-gez v0, :cond_13
.line 55
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
:cond_13
invoke-virtual {p0, v1, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object p0
return-object p0
:cond_18
const/4 p0, 0x0
return-object p0
.end method
.method public static a()Lsg/bigo/bigohttp/stat/f;
.registers 1
.line 34
invoke-static {}, Lsg/bigo/bigohttp/stat/f$a;->a()Lsg/bigo/bigohttp/stat/f;
move-result-object v0
return-object v0
.end method
.method public static a(Lsg/bigo/bigohttp/stat/IReportHttpStat;)V
.registers 2
.line 2058
invoke-static {}, Lsg/bigo/bigohttp/stat/d$a;->a()Lsg/bigo/bigohttp/stat/d;
move-result-object v0
.line 2063
iput-object p0, v0, Lsg/bigo/bigohttp/stat/d;->c:Lsg/bigo/bigohttp/stat/IReportHttpStat;
return-void
.end method
.method public static a(Z)V
.registers 3
.line 1058
invoke-static {}, Lsg/bigo/bigohttp/stat/d$a;->a()Lsg/bigo/bigohttp/stat/d;
move-result-object v0
.line 1176
iput-boolean p0, v0, Lsg/bigo/bigohttp/stat/d;->a:Z
if-nez p0, :cond_29
.line 1177
iget-object p0, v0, Lsg/bigo/bigohttp/stat/d;->b:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p0}, Ljava/util/concurrent/ConcurrentHashMap;->size()I
move-result p0
if-lez p0, :cond_29
.line 1178
iget-boolean p0, v0, Lsg/bigo/bigohttp/stat/d;->d:Z
if-eqz p0, :cond_1d
.line 1179
invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;
move-result-object p0
iget-object v1, v0, Lsg/bigo/bigohttp/stat/d;->e:Ljava/lang/Runnable;
invoke-virtual {p0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
.line 1181
:cond_1d
invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;
move-result-object p0
iget-object v1, v0, Lsg/bigo/bigohttp/stat/d;->e:Ljava/lang/Runnable;
invoke-virtual {p0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
const/4 p0, 0x1
.line 1182
iput-boolean p0, v0, Lsg/bigo/bigohttp/stat/d;->d:Z
:cond_29
return-void
.end method
# virtual methods
.method final b()V
.registers 3
.line 78
iget-object v0, p0, Lsg/bigo/bigohttp/stat/f;->b:Ljava/lang/ThreadLocal;
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lsg/bigo/bigohttp/stat/h;
if-eqz v0, :cond_19
.line 79
iget-object v1, v0, Lsg/bigo/bigohttp/stat/h;->n:Ljava/lang/String;
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_19
.line 80
iget-object v1, p0, Lsg/bigo/bigohttp/stat/f;->c:Ljava/util/concurrent/ConcurrentHashMap;
iget-object v0, v0, Lsg/bigo/bigohttp/stat/h;->n:Ljava/lang/String;
invoke-virtual {v1, v0}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 82
:cond_19
iget-object v0, p0, Lsg/bigo/bigohttp/stat/f;->b:Ljava/lang/ThreadLocal;
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->remove()V
return-void
.end method
.method public final c()Lsg/bigo/bigohttp/stat/h;
.registers 2
.line 118
iget-object v0, p0, Lsg/bigo/bigohttp/stat/f;->b:Ljava/lang/ThreadLocal;
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lsg/bigo/bigohttp/stat/h;
return-object v0
.end method
.method public final onNetworkStateChanged(Z)V
.registers 4
.line 221
iget-object p1, p0, Lsg/bigo/bigohttp/stat/f;->c:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p1}, Ljava/util/concurrent/ConcurrentHashMap;->values()Ljava/util/Collection;
move-result-object p1
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_a
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1a
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lsg/bigo/bigohttp/stat/h;
const/4 v1, 0x1
.line 2108
iput-boolean v1, v0, Lsg/bigo/bigohttp/stat/h;->f:Z
goto :goto_a
:cond_1a
return-void
.end method