ConnectionTypeUtil.smali
.class public Lcom/cleanmaster/junk/util/ConnectionTypeUtil;
.super Ljava/lang/Object;
.source "ConnectionTypeUtil.java"
# static fields
.field private static sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 13
const/4 v0, 0x0
sput-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 11
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getConnectionType()I
.registers 1
.prologue
.line 34
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
if-eqz v0, :cond_b
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
.line 35
invoke-virtual {v0}, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;->getConnectionType()I
move-result v0
.line 34
:goto_a
return v0
.line 35
:cond_b
const/4 v0, 0x0
goto :goto_a
.end method
.method public static declared-synchronized initialize(Landroid/content/Context;)Z
.registers 4
.prologue
.line 16
const-class v1, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;
monitor-enter v1
:try_start_3
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
if-nez v0, :cond_12
.line 17
new-instance v0, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v2
invoke-direct {v0, v2}, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;-><init>(Landroid/content/Context;)V
sput-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
:try_end_12
.catchall {:try_start_3 .. :try_end_12} :catchall_15
.line 19
:cond_12
const/4 v0, 0x1
monitor-exit v1
return v0
.line 16
:catchall_15
move-exception v0
monitor-exit v1
throw v0
.end method
.method public static isNetworkAvailable()Z
.registers 1
.prologue
.line 23
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
if-eqz v0, :cond_b
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
invoke-virtual {v0}, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;->isNetworkAvailable()Z
move-result v0
:goto_a
return v0
:cond_b
const/4 v0, 0x0
goto :goto_a
.end method
.method public static safeGetIsNetworkStatus()Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper$NetworkStatus;
.registers 1
.prologue
.line 27
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
if-eqz v0, :cond_b
sget-object v0, Lcom/cleanmaster/junk/util/ConnectionTypeUtil;->sConnectionInfoHelper:Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;
.line 28
invoke-virtual {v0}, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper;->safeGetIsNetworkStatus()Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper$NetworkStatus;
move-result-object v0
.line 27
:goto_a
return-object v0
.line 28
:cond_b
new-instance v0, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper$NetworkStatus;
invoke-direct {v0}, Lcom/cleanmaster/junkengine/junk/util/ConnectionInfoHelper$NetworkStatus;-><init>()V
goto :goto_a
.end method