CallNetWorkReceiver.smali
.class public Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;
.super Landroid/content/BroadcastReceiver;
.source "CallNetWorkReceiver.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
}
.end annotation
# instance fields
.field private dataNetworkInfo:Landroid/net/NetworkInfo;
.field private mCallBack:Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
.field private wifiNetworkInfo:Landroid/net/NetworkInfo;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 11
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.registers 9
.param p1, "context" # Landroid/content/Context;
.param p2, "intent" # Landroid/content/Intent;
.line 17
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const-string v1, "connectivity"
const/4 v2, 0x1
const/16 v3, 0x17
if-ge v0, v3, :cond_1d
.line 18
invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
.line 19
.local v0, "connMgr":Landroid/net/ConnectivityManager;
invoke-virtual {v0, v2}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v1
iput-object v1, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->wifiNetworkInfo:Landroid/net/NetworkInfo;
.line 20
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v1
iput-object v1, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->dataNetworkInfo:Landroid/net/NetworkInfo;
.line 21
.end local v0 # "connMgr":Landroid/net/ConnectivityManager;
goto :goto_45
.line 22
:cond_1d
invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
.line 23
.restart local v0 # "connMgr":Landroid/net/ConnectivityManager;
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getAllNetworks()[Landroid/net/Network;
move-result-object v1
.line 24
.local v1, "networks":[Landroid/net/Network;
const/4 v3, 0x0
.local v3, "i":I
:goto_28
array-length v4, v1
if-ge v3, v4, :cond_45
.line 25
aget-object v4, v1, v3
invoke-virtual {v0, v4}, Landroid/net/ConnectivityManager;->getNetworkInfo(Landroid/net/Network;)Landroid/net/NetworkInfo;
move-result-object v4
.line 26
.local v4, "networkInfo":Landroid/net/NetworkInfo;
invoke-virtual {v4}, Landroid/net/NetworkInfo;->getType()I
move-result v5
if-ne v5, v2, :cond_3a
.line 27
iput-object v4, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->wifiNetworkInfo:Landroid/net/NetworkInfo;
goto :goto_42
.line 28
:cond_3a
invoke-virtual {v4}, Landroid/net/NetworkInfo;->getType()I
move-result v5
if-nez v5, :cond_42
.line 29
iput-object v4, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->dataNetworkInfo:Landroid/net/NetworkInfo;
.line 24
.end local v4 # "networkInfo":Landroid/net/NetworkInfo;
:cond_42
:goto_42
add-int/lit8 v3, v3, 0x1
goto :goto_28
.line 33
.end local v0 # "connMgr":Landroid/net/ConnectivityManager;
.end local v1 # "networks":[Landroid/net/Network;
.end local v3 # "i":I
:cond_45
:goto_45
iget-object v0, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->wifiNetworkInfo:Landroid/net/NetworkInfo;
if-eqz v0, :cond_4f
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-nez v0, :cond_59
:cond_4f
iget-object v0, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->dataNetworkInfo:Landroid/net/NetworkInfo;
if-eqz v0, :cond_61
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-eqz v0, :cond_61
.line 34
:cond_59
iget-object v0, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->mCallBack:Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
if-eqz v0, :cond_68
.line 35
invoke-interface {v0}, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;->onNetWorkConnected()V
goto :goto_68
.line 37
:cond_61
iget-object v0, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->mCallBack:Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
if-eqz v0, :cond_68
.line 38
invoke-interface {v0}, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;->onNetWorkDisconnected()V
.line 40
:cond_68
:goto_68
return-void
.end method
.method public setCallBack(Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;)V
.registers 2
.param p1, "mCallBack" # Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
.line 43
iput-object p1, p0, Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver;->mCallBack:Lim/tpelyyftgw/ui/hui/visualcall/CallNetWorkReceiver$NetWorkStateCallBack;
.line 44
return-void
.end method