n.smali

.class public Lcom/cmcm/ad/data/dataProvider/adlogic/e/n;
.super Ljava/lang/Object;
.source "NetworkUtil.java"


# static fields
.field private static final a:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 25
    const-class v0, Lcom/cmcm/ad/data/dataProvider/adlogic/e/n;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/cmcm/ad/data/dataProvider/adlogic/e/n;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static a(Landroid/content/Context;)Z
    .registers 5

    .prologue
    const/4 v1, 0x1

    const/4 v0, 0x0

    .line 106
    if-nez p0, :cond_5

    .line 115
    :cond_4
    :goto_4
    return v0

    .line 109
    :cond_5
    invoke-static {}, Lcom/cleanmaster/pluginscommonlib/n;->g()Z

    move-result v2

    if-eqz v2, :cond_d

    move v0, v1

    .line 110
    goto :goto_4

    .line 112
    :cond_d
    invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v2

    const-string v3, "allow_access_network"

    invoke-virtual {v2, v3, v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getBooleanValue(Ljava/lang/String;Z)Z

    move-result v2

    if-eqz v2, :cond_4

    move v0, v1

    .line 113
    goto :goto_4
.end method

.method public static b(Landroid/content/Context;)Z
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 172
    if-nez p0, :cond_4

    .line 188
    :cond_3
    :goto_3
    return v1

    .line 174
    :cond_4
    invoke-static {}, Lcom/cleanmaster/pluginscommonlib/n;->g()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 178
    const-string/jumbo v0, "wifi"

    .line 179
    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 181
    :try_start_13
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_16} :catch_1c

    move-result v0

    if-eqz v0, :cond_1f

    .line 182
    const/4 v0, 0x1

    :goto_1a
    move v1, v0

    .line 188
    goto :goto_3

    .line 184
    :catch_1c
    move-exception v0

    move v0, v1

    goto :goto_1a

    :cond_1f
    move v0, v1

    goto :goto_1a
.end method

.method public static c(Landroid/content/Context;)Z
    .registers 5

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 195
    const-string v0, "connectivity"

    .line 196
    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/ConnectivityManager;

    .line 197
    if-nez v0, :cond_e

    move v0, v1

    .line 216
    :goto_d
    return v0

    .line 203
    :cond_e
    const/4 v3, 0x1

    .line 204
    :try_start_f
    invoke-virtual {v0, v3}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
    :try_end_12
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_12} :catch_17

    move-result-object v0

    .line 205
    if-nez v0, :cond_1a

    move v0, v1

    .line 206
    goto :goto_d

    .line 208
    :catch_17
    move-exception v0

    move v0, v1

    .line 209
    goto :goto_d

    .line 212
    :cond_1a
    invoke-virtual {v0}, Landroid/net/NetworkInfo;->getState()Landroid/net/NetworkInfo$State;

    move-result-object v0

    .line 213
    sget-object v3, Landroid/net/NetworkInfo$State;->CONNECTED:Landroid/net/NetworkInfo$State;

    if-eq v0, v3, :cond_26

    sget-object v3, Landroid/net/NetworkInfo$State;->CONNECTING:Landroid/net/NetworkInfo$State;

    if-ne v0, v3, :cond_28

    :cond_26
    move v0, v2

    .line 214
    goto :goto_d

    :cond_28
    move v0, v1

    .line 216
    goto :goto_d
.end method