.class Lcom/hanvon/inputmethod/callaime/settings/Register$2;
.super Ljava/lang/Object;
.source "Register.java"
# interfaces
.implements Landroid/view/View$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/hanvon/inputmethod/callaime/settings/Register;->onCreate(Landroid/os/Bundle;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
.field private final synthetic val$button:Landroid/widget/Button;
# direct methods
.method constructor <init>(Lcom/hanvon/inputmethod/callaime/settings/Register;Landroid/widget/Button;)V
.locals 0
.parameter
.parameter
.prologue
.line 1
iput-object p1, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
iput-object p2, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->val$button:Landroid/widget/Button;
.line 56
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/view/View;)V
.locals 12
.parameter "v"
.prologue
const/4 v11, 0x6
const/4 v10, 0x4
const/4 v7, 0x3
const/4 v9, 0x1
const/4 v8, 0x0
.line 59
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->val$button:Landroid/widget/Button;
invoke-virtual {v5, v8}, Landroid/widget/Button;->setEnabled(Z)V
.line 60
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
const v6, 0x7f0c0032
invoke-virtual {v5, v6}, Lcom/hanvon/inputmethod/callaime/settings/Register;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/EditText;
.line 61
.local v4, userEdit:Landroid/widget/EditText;
invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v5
invoke-interface {v5}, Landroid/text/Editable;->toString()Ljava/lang/String;
move-result-object v5
sput-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->deviceId3:Ljava/lang/String;
.line 62
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
const v6, 0x7f0c0034
invoke-virtual {v5, v6}, Lcom/hanvon/inputmethod/callaime/settings/Register;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/EditText;
.line 63
.local v0, codeEdit:Landroid/widget/EditText;
invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v5
invoke-interface {v5}, Landroid/text/Editable;->toString()Ljava/lang/String;
move-result-object v5
sput-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->deviceId4:Ljava/lang/String;
.line 65
const/4 v1, 0x0
.line 66
.local v1, errMsg:Ljava/lang/String;
const/4 v2, -0x1
.line 67
.local v2, msgId:I
invoke-static {}, Lcom/hanvon/inputmethod/callaime/data/CallaData;->checkDeviceState()I
move-result v3
.line 68
.local v3, rst:I
const/4 v5, -0x1
if-ne v3, v5, :cond_3
.line 69
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
if-eqz v5, :cond_2
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v7
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->containsKey(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_2
.line 70
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v7
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->getAsString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 74
:goto_0
const/4 v2, 0x1
.line 93
:goto_1
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
invoke-static {v5}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$0(Lcom/hanvon/inputmethod/callaime/settings/Register;)Landroid/app/AlertDialog;
move-result-object v5
if-nez v5, :cond_0
.line 94
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
new-instance v6, Landroid/app/AlertDialog$Builder;
iget-object v7, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
invoke-direct {v6, v7}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
invoke-virtual {v6}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v6
invoke-static {v5, v6}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$2(Lcom/hanvon/inputmethod/callaime/settings/Register;Landroid/app/AlertDialog;)V
.line 96
:cond_0
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
invoke-static {v5}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$0(Lcom/hanvon/inputmethod/callaime/settings/Register;)Landroid/app/AlertDialog;
move-result-object v5
invoke-virtual {v5, v1}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V
.line 97
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
invoke-static {v5}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$0(Lcom/hanvon/inputmethod/callaime/settings/Register;)Landroid/app/AlertDialog;
move-result-object v5
invoke-virtual {v5}, Landroid/app/AlertDialog;->show()V
.line 98
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->this$0:Lcom/hanvon/inputmethod/callaime/settings/Register;
invoke-static {v5}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$3(Lcom/hanvon/inputmethod/callaime/settings/Register;)Landroid/os/Handler;
move-result-object v5
const-wide/16 v6, 0x4b0
invoke-virtual {v5, v2, v6, v7}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
.line 99
if-ne v2, v9, :cond_1
.line 100
iget-object v5, p0, Lcom/hanvon/inputmethod/callaime/settings/Register$2;->val$button:Landroid/widget/Button;
invoke-virtual {v5, v9}, Landroid/widget/Button;->setEnabled(Z)V
.line 102
:cond_1
return-void
.line 72
:cond_2
const-string v1, "Invalid Code"
goto :goto_0
.line 76
:cond_3
const/4 v5, -0x2
if-ne v3, v5, :cond_5
.line 77
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
if-eqz v5, :cond_4
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v11
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->containsKey(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_4
.line 78
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v11
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->getAsString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 82
:goto_2
const/4 v2, 0x1
goto :goto_1
.line 80
:cond_4
const-string v1, "Save code to file failed."
goto :goto_2
.line 84
:cond_5
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
if-eqz v5, :cond_6
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v10
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->containsKey(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_6
.line 85
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->messageTitleValues:Landroid/content/ContentValues;
invoke-static {}, Lcom/hanvon/inputmethod/callaime/settings/Register;->access$1()[Ljava/lang/String;
move-result-object v6
aget-object v6, v6, v10
invoke-virtual {v5, v6}, Landroid/content/ContentValues;->getAsString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 89
:goto_3
const/4 v2, 0x2
.line 90
sget-object v5, Lcom/hanvon/inputmethod/callaime/data/CallaData;->settingsValues:Landroid/content/ContentValues;
sget-object v6, Lcom/hanvon/inputmethod/callaime/data/CallaData;->databaseContents:[Ljava/lang/String;
const/16 v7, 0x23
aget-object v6, v6, v7
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v7
invoke-virtual {v5, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
goto/16 :goto_1
.line 87
:cond_6
const-string v1, "Successful."
goto :goto_3
.end method
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课