c$1.smali
.class Lcom/umeng/commonsdk/internal/utils/c$1;
.super Landroid/content/BroadcastReceiver;
.source "BatteryUtils.java"
# instance fields
.field final synthetic a:Lcom/umeng/commonsdk/internal/utils/c;
# direct methods
.method constructor <init>(Lcom/umeng/commonsdk/internal/utils/c;)V
.registers 2
.prologue
.line 74
iput-object p1, p0, Lcom/umeng/commonsdk/internal/utils/c$1;->a:Lcom/umeng/commonsdk/internal/utils/c;
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 11
.prologue
const/4 v1, 0x2
const/4 v3, -0x1
const/4 v0, 0x1
const/4 v2, 0x0
.line 79
:try_start_4
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v4
.line 80
const-string v5, "android.intent.action.BATTERY_CHANGED"
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_94
.line 81
new-instance v4, Lorg/json/JSONObject;
invoke-direct {v4}, Lorg/json/JSONObject;-><init>()V
.line 83
const-string v5, "level"
const/4 v6, 0x0
invoke-virtual {p2, v5, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
:try_end_1b
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_1b} :catch_9d
move-result v5
.line 85
:try_start_1c
const-string v6, "le"
invoke-virtual {v4, v6, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
:try_end_21
.catch Ljava/lang/Exception; {:try_start_1c .. :try_end_21} :catch_ae
.catch Ljava/lang/Throwable; {:try_start_1c .. :try_end_21} :catch_9d
.line 89
:goto_21
:try_start_21
const-string v5, "voltage"
const/4 v6, 0x0
invoke-virtual {p2, v5, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
:try_end_27
.catch Ljava/lang/Throwable; {:try_start_21 .. :try_end_27} :catch_9d
move-result v5
.line 91
:try_start_28
const-string v6, "vol"
invoke-virtual {v4, v6, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
:try_end_2d
.catch Ljava/lang/Exception; {:try_start_28 .. :try_end_2d} :catch_ac
.catch Ljava/lang/Throwable; {:try_start_28 .. :try_end_2d} :catch_9d
.line 96
:goto_2d
:try_start_2d
const-string v5, "temperature"
const/4 v6, 0x0
invoke-virtual {p2, v5, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
:try_end_33
.catch Ljava/lang/Throwable; {:try_start_2d .. :try_end_33} :catch_9d
move-result v5
.line 98
:try_start_34
const-string v6, "temp"
invoke-virtual {v4, v6, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
.line 99
const-string v5, "ts"
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
invoke-virtual {v4, v5, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
:try_end_42
.catch Ljava/lang/Exception; {:try_start_34 .. :try_end_42} :catch_aa
.catch Ljava/lang/Throwable; {:try_start_34 .. :try_end_42} :catch_9d
.line 104
:goto_42
:try_start_42
const-string v5, "status"
const/4 v6, 0x0
invoke-virtual {p2, v5, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
:try_end_48
.catch Ljava/lang/Throwable; {:try_start_42 .. :try_end_48} :catch_9d
move-result v5
.line 106
packed-switch v5, :pswitch_data_b2
.line 133
:goto_4c
:pswitch_4c
:try_start_4c
const-string v5, "st"
invoke-virtual {v4, v5, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
:try_end_51
.catch Ljava/lang/Exception; {:try_start_4c .. :try_end_51} :catch_a8
.catch Ljava/lang/Throwable; {:try_start_4c .. :try_end_51} :catch_9d
.line 138
:goto_51
:try_start_51
const-string v3, "plugged"
const/4 v5, 0x0
invoke-virtual {p2, v3, v5}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
:try_end_57
.catch Ljava/lang/Throwable; {:try_start_51 .. :try_end_57} :catch_9d
move-result v3
.line 140
packed-switch v3, :pswitch_data_c0
move v0, v2
.line 151
:goto_5c
:pswitch_5c
:try_start_5c
const-string v1, "ct"
invoke-virtual {v4, v1, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
.line 152
const-string v0, "ts"
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
invoke-virtual {v4, v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
:try_end_6a
.catch Ljava/lang/Exception; {:try_start_5c .. :try_end_6a} :catch_a6
.catch Ljava/lang/Throwable; {:try_start_5c .. :try_end_6a} :catch_9d
.line 159
:goto_6a
:try_start_6a
const-string v0, "BatteryUtils"
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
invoke-virtual {v4}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
invoke-static {v0, v1}, Lcom/umeng/commonsdk/statistics/common/ULog;->i(Ljava/lang/String;[Ljava/lang/Object;)V
.line 161
const v0, 0x8003
.line 162
invoke-static {}, Lcom/umeng/commonsdk/internal/utils/c;->d()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/umeng/commonsdk/internal/b;->a(Landroid/content/Context;)Lcom/umeng/commonsdk/internal/b;
move-result-object v1
invoke-virtual {v1}, Lcom/umeng/commonsdk/internal/b;->a()Lcom/umeng/commonsdk/internal/c;
move-result-object v1
invoke-virtual {v4}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object v2
.line 161
invoke-static {p1, v0, v1, v2}, Lcom/umeng/commonsdk/framework/UMWorkDispatch;->sendEvent(Landroid/content/Context;ILcom/umeng/commonsdk/framework/UMLogDataProtocol;Ljava/lang/Object;)V
.line 164
iget-object v0, p0, Lcom/umeng/commonsdk/internal/utils/c$1;->a:Lcom/umeng/commonsdk/internal/utils/c;
invoke-virtual {v0}, Lcom/umeng/commonsdk/internal/utils/c;->c()V
:try_end_94
.catch Ljava/lang/Throwable; {:try_start_6a .. :try_end_94} :catch_9d
.line 171
:cond_94
:goto_94
return-void
:pswitch_95
move v3, v0
.line 116
goto :goto_4c
:pswitch_97
move v3, v2
.line 125
goto :goto_4c
:pswitch_99
move v3, v1
.line 129
goto :goto_4c
:pswitch_9b
move v0, v1
.line 147
goto :goto_5c
.line 167
:catch_9d
move-exception v0
.line 168
invoke-static {}, Lcom/umeng/commonsdk/internal/utils/c;->d()Landroid/content/Context;
move-result-object v1
invoke-static {v1, v0}, Lcom/umeng/commonsdk/internal/crash/UMCrashManager;->reportCrash(Landroid/content/Context;Ljava/lang/Throwable;)V
goto :goto_94
.line 154
:catch_a6
move-exception v0
goto :goto_6a
.line 134
:catch_a8
move-exception v3
goto :goto_51
.line 100
:catch_aa
move-exception v5
goto :goto_42
.line 92
:catch_ac
move-exception v5
goto :goto_2d
.line 86
:catch_ae
move-exception v5
goto/16 :goto_21
.line 106
nop
:pswitch_data_b2
.packed-switch 0x1
:pswitch_4c
:pswitch_95
:pswitch_4c
:pswitch_97
:pswitch_99
.end packed-switch
.line 140
:pswitch_data_c0
.packed-switch 0x1
:pswitch_5c
:pswitch_9b
.end packed-switch
.end method