NetworkReceiver.smali

.class public Lsg/bigo/bigohttp/stat/NetworkReceiver;
.super Landroid/content/BroadcastReceiver;
.source "SourceFile"


# instance fields
.field public a:Lsg/bigo/bigohttp/stat/NetworkStateListener;

.field private b:Z

.field private c:I

.field private final d:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>()V
    .registers 2

    .line 15
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    const/4 v0, 0x0

    .line 20
    iput-object v0, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->a:Lsg/bigo/bigohttp/stat/NetworkStateListener;

    .line 72
    new-instance v0, Lsg/bigo/bigohttp/stat/NetworkReceiver$2;

    invoke-direct {v0, p0}, Lsg/bigo/bigohttp/stat/NetworkReceiver$2;-><init>(Lsg/bigo/bigohttp/stat/NetworkReceiver;)V

    iput-object v0, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->d:Ljava/lang/Runnable;

    return-void
.end method

.method static synthetic a()I
    .registers 1

    .line 15
    invoke-static {}, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b()I

    move-result v0

    return v0
.end method

.method static synthetic a(Lsg/bigo/bigohttp/stat/NetworkReceiver;I)I
    .registers 2

    .line 15
    iput p1, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->c:I

    return p1
.end method

.method static synthetic a(Lsg/bigo/bigohttp/stat/NetworkReceiver;)Lsg/bigo/bigohttp/stat/NetworkStateListener;
    .registers 1

    .line 15
    iget-object p0, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->a:Lsg/bigo/bigohttp/stat/NetworkStateListener;

    return-object p0
.end method

.method static synthetic a(Lsg/bigo/bigohttp/stat/NetworkReceiver;Z)Z
    .registers 2

    .line 15
    iput-boolean p1, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b:Z

    return p1
.end method

.method private static b()I
    .registers 2

    .line 90
    invoke-static {}, Lsg/bigo/bigohttp/utils/e;->b()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_8

    const/4 v0, 0x3

    :cond_8
    return v0
.end method

.method static synthetic b(Lsg/bigo/bigohttp/stat/NetworkReceiver;)Z
    .registers 1

    .line 15
    iget-boolean p0, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b:Z

    return p0
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 5

    const-string p1, "noConnectivity"

    const/4 v0, 0x1

    .line 42
    :try_start_3
    invoke-virtual {p2, p1}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_10

    const/4 v1, 0x0

    .line 43
    invoke-virtual {p2, p1, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result p1

    xor-int/2addr v0, p1

    goto :goto_16

    .line 45
    :cond_10
    invoke-static {}, Lsg/bigo/bigohttp/utils/e;->a()Z

    move-result v0
    :try_end_14
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_14} :catch_15

    goto :goto_16

    :catch_15
    nop

    .line 50
    :goto_16
    invoke-static {}, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b()I

    move-result p1

    .line 51
    iget-boolean p2, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b:Z

    if-ne p2, v0, :cond_23

    iget p2, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->c:I

    if-ne p2, p1, :cond_23

    return-void

    .line 54
    :cond_23
    iput-boolean v0, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->b:Z

    .line 55
    iput p1, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->c:I

    .line 57
    invoke-static {v0}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;

    move-result-object p1

    const-string p2, "network change, has connectivity ->"

    invoke-virtual {p2, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string p2, "NetworkReceiver"

    invoke-static {p2, p1}, Lsg/bigo/bigohttp/e;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 59
    invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;

    move-result-object p1

    iget-object v1, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->d:Ljava/lang/Runnable;

    invoke-virtual {p1, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    if-eqz v0, :cond_62

    .line 61
    invoke-static {}, Lsg/bigo/bigohttp/utils/e;->c()Z

    move-result p1

    if-nez p1, :cond_58

    const-string p1, "network is not stabled yet"

    .line 62
    invoke-static {p2, p1}, Lsg/bigo/bigohttp/e;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 63
    invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;

    move-result-object p1

    iget-object p2, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->d:Ljava/lang/Runnable;

    const-wide/16 v0, 0x1f4

    invoke-virtual {p1, p2, v0, v1}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void

    .line 65
    :cond_58
    invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;

    move-result-object p1

    iget-object p2, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->d:Ljava/lang/Runnable;

    invoke-virtual {p1, p2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void

    .line 68
    :cond_62
    invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;

    move-result-object p1

    iget-object p2, p0, Lsg/bigo/bigohttp/stat/NetworkReceiver;->d:Ljava/lang/Runnable;

    invoke-virtual {p1, p2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method