CancelAccountDeletionActivity$PhoneView.smali

.class public Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;
.super Lim/tpelyyftgw/ui/components/SlideView;
.source "CancelAccountDeletionActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "PhoneView"
.end annotation


# instance fields
.field private nextPressed:Z

.field private progressBar:Lim/tpelyyftgw/ui/components/RadialProgressView;

.field final synthetic this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;


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

    return-void
.end method

.method public constructor <init>(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;Landroid/content/Context;)V
    .registers 7
    .param p1, "this$0"    # Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;
    .param p2, "context"    # Landroid/content/Context;

    .line 334
    iput-object p1, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    .line 335
    invoke-direct {p0, p2}, Lim/tpelyyftgw/ui/components/SlideView;-><init>(Landroid/content/Context;)V

    .line 331
    const/4 v0, 0x0

    iput-boolean v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->nextPressed:Z

    .line 337
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->setOrientation(I)V

    .line 339
    new-instance v0, Landroid/widget/FrameLayout;

    invoke-direct {v0, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 340
    .local v0, "frameLayout":Landroid/widget/FrameLayout;
    const/4 v1, -0x1

    const/16 v2, 0xc8

    invoke-static {v1, v2}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(II)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 342
    new-instance v1, Lim/tpelyyftgw/ui/components/RadialProgressView;

    invoke-direct {v1, p2}, Lim/tpelyyftgw/ui/components/RadialProgressView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->progressBar:Lim/tpelyyftgw/ui/components/RadialProgressView;

    .line 343
    const/4 v2, -0x2

    const/16 v3, 0x11

    invoke-static {v2, v2, v3}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 344
    return-void
.end method

.method static synthetic access$3700(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;)Lim/tpelyyftgw/ui/components/RadialProgressView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;

    .line 329
    iget-object v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->progressBar:Lim/tpelyyftgw/ui/components/RadialProgressView;

    return-object v0
.end method


# virtual methods
.method public getHeaderName()Ljava/lang/String;
    .registers 3

    .line 421
    const-string v0, "CancelAccountReset"

    const v1, 0x7f0f02f9

    invoke-static {v0, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public synthetic lambda$null$0$CancelAccountDeletionActivity$PhoneView(Lim/tpelyyftgw/tgnet/TLRPC$TL_error;Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;)V
    .registers 9
    .param p1, "error"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_error;
    .param p2, "params"    # Landroid/os/Bundle;
    .param p3, "response"    # Lim/tpelyyftgw/tgnet/TLObject;
    .param p4, "req"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;

    .line 410
    const/4 v0, 0x0

    iput-boolean v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->nextPressed:Z

    .line 411
    if-nez p1, :cond_e

    .line 412
    iget-object v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    move-object v1, p3

    check-cast v1, Lim/tpelyyftgw/tgnet/TLRPC$TL_auth_sentCode;

    # invokes: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->fillNextCodeParams(Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLRPC$TL_auth_sentCode;)V
    invoke-static {v0, p2, v1}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$600(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLRPC$TL_auth_sentCode;)V

    goto :goto_1f

    .line 414
    :cond_e
    iget-object v1, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    # getter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->currentAccount:I
    invoke-static {v1}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$800(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;)I

    move-result v2

    iget-object v3, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    new-array v0, v0, [Ljava/lang/Object;

    invoke-static {v2, p1, v3, p4, v0}, Lim/tpelyyftgw/ui/components/AlertsCreator;->processError(ILim/tpelyyftgw/tgnet/TLRPC$TL_error;Lim/tpelyyftgw/ui/actionbar/BaseFragment;Lim/tpelyyftgw/tgnet/TLObject;[Ljava/lang/Object;)Landroid/app/Dialog;

    move-result-object v0

    # setter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->errorDialog:Landroid/app/Dialog;
    invoke-static {v1, v0}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$702(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;Landroid/app/Dialog;)Landroid/app/Dialog;

    .line 416
    :goto_1f
    return-void
.end method

.method public synthetic lambda$onNextPressed$1$CancelAccountDeletionActivity$PhoneView(Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/TLRPC$TL_error;)V
    .registers 12
    .param p1, "params"    # Landroid/os/Bundle;
    .param p2, "req"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;
    .param p3, "response"    # Lim/tpelyyftgw/tgnet/TLObject;
    .param p4, "error"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    .line 409
    new-instance v6, Lim/tpelyyftgw/ui/-$$Lambda$CancelAccountDeletionActivity$PhoneView$IAf7ijjbsRaKVjeG861lyVlOPoI;

    move-object v0, v6

    move-object v1, p0

    move-object v2, p4

    move-object v3, p1

    move-object v4, p3

    move-object v5, p2

    invoke-direct/range {v0 .. v5}, Lim/tpelyyftgw/ui/-$$Lambda$CancelAccountDeletionActivity$PhoneView$IAf7ijjbsRaKVjeG861lyVlOPoI;-><init>(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;Lim/tpelyyftgw/tgnet/TLRPC$TL_error;Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;)V

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method public onNextPressed()V
    .registers 12

    .line 348
    iget-object v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->getParentActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    if-eqz v0, :cond_d0

    iget-boolean v0, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->nextPressed:Z

    if-eqz v0, :cond_e

    goto/16 :goto_d0

    .line 351
    :cond_e
    sget-object v0, Lim/tpelyyftgw/messenger/ApplicationLoader;->applicationContext:Landroid/content/Context;

    const-string v1, "phone"

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

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 352
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I

    move-result v2

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-eq v2, v3, :cond_28

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getPhoneType()I

    move-result v2

    if-eqz v2, :cond_28

    const/4 v2, 0x1

    goto :goto_29

    :cond_28
    const/4 v2, 0x0

    .line 353
    .local v2, "simcardAvailable":Z
    :goto_29
    const/4 v5, 0x1

    .line 354
    .local v5, "allowCall":Z
    sget v6, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v7, 0x17

    .line 378
    new-instance v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;

    invoke-direct {v6}, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;-><init>()V

    .line 379
    .local v6, "req":Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;
    iget-object v7, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    # getter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->hash:Ljava/lang/String;
    invoke-static {v7}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$300(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->hash:Ljava/lang/String;

    .line 380
    new-instance v7, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    invoke-direct {v7}, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;-><init>()V

    iput-object v7, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    .line 381
    iget-object v7, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iput-boolean v4, v7, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_flashcall:Z

    .line 382
    iget-object v7, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    sget-boolean v8, Lim/tpelyyftgw/messenger/ApplicationLoader;->hasPlayServices:Z

    iput-boolean v8, v7, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_app_hash:Z

    .line 383
    sget-object v7, Lim/tpelyyftgw/messenger/ApplicationLoader;->applicationContext:Landroid/content/Context;

    const-string v8, "mainconfig"

    invoke-virtual {v7, v8, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    .line 384
    .local v7, "preferences":Landroid/content/SharedPreferences;
    iget-object v8, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iget-boolean v8, v8, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_app_hash:Z

    const-string/jumbo v9, "sms_hash"

    if-eqz v8, :cond_6b

    .line 385
    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v8

    sget-object v10, Lim/tpelyyftgw/messenger/BuildVars;->SMS_HASH:Ljava/lang/String;

    invoke-interface {v8, v9, v10}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v8

    invoke-interface {v8}, Landroid/content/SharedPreferences$Editor;->commit()Z

    goto :goto_76

    .line 387
    :cond_6b
    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v8

    invoke-interface {v8, v9}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v8

    invoke-interface {v8}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 389
    :goto_76
    iget-object v8, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iget-boolean v8, v8, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_flashcall:Z

    if-eqz v8, :cond_ac

    .line 391
    :try_start_7c
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getLine1Number()Ljava/lang/String;

    move-result-object v8

    .line 392
    .local v8, "number":Ljava/lang/String;
    invoke-static {v8}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_9f

    .line 393
    iget-object v9, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iget-object v10, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    # getter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->phone:Ljava/lang/String;
    invoke-static {v10}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$400(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;)Ljava/lang/String;

    move-result-object v10

    invoke-static {v10, v8}, Landroid/telephony/PhoneNumberUtils;->compare(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v10

    iput-boolean v10, v9, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->current_number:Z

    .line 394
    iget-object v9, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iget-boolean v9, v9, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->current_number:Z

    if-nez v9, :cond_a3

    .line 395
    iget-object v9, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iput-boolean v4, v9, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_flashcall:Z

    goto :goto_a3

    .line 398
    :cond_9f
    iget-object v9, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iput-boolean v4, v9, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->current_number:Z
    :try_end_a3
    .catch Ljava/lang/Exception; {:try_start_7c .. :try_end_a3} :catch_a4

    .line 403
    .end local v8    # "number":Ljava/lang/String;
    :cond_a3
    :goto_a3
    goto :goto_ac

    .line 400
    :catch_a4
    move-exception v8

    .line 401
    .local v8, "e":Ljava/lang/Exception;
    iget-object v9, v6, Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;->settings:Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;

    iput-boolean v4, v9, Lim/tpelyyftgw/tgnet/TLRPC$TL_codeSettings;->allow_flashcall:Z

    .line 402
    invoke-static {v8}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 406
    .end local v8    # "e":Ljava/lang/Exception;
    :cond_ac
    :goto_ac
    new-instance v4, Landroid/os/Bundle;

    invoke-direct {v4}, Landroid/os/Bundle;-><init>()V

    .line 407
    .local v4, "params":Landroid/os/Bundle;
    iget-object v8, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    # getter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->phone:Ljava/lang/String;
    invoke-static {v8}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$400(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v1, v8}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 408
    iput-boolean v3, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->nextPressed:Z

    .line 409
    iget-object v1, p0, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->this$0:Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;

    # getter for: Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->currentAccount:I
    invoke-static {v1}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;->access$500(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity;)I

    move-result v1

    invoke-static {v1}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->getInstance(I)Lim/tpelyyftgw/tgnet/ConnectionsManager;

    move-result-object v1

    new-instance v3, Lim/tpelyyftgw/ui/-$$Lambda$CancelAccountDeletionActivity$PhoneView$sH2ITGCrCfZvBQHlmwXfjm1HYck;

    invoke-direct {v3, p0, v4, v6}, Lim/tpelyyftgw/ui/-$$Lambda$CancelAccountDeletionActivity$PhoneView$sH2ITGCrCfZvBQHlmwXfjm1HYck;-><init>(Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;Landroid/os/Bundle;Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;)V

    const/4 v8, 0x2

    invoke-virtual {v1, v6, v3, v8}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->sendRequest(Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/RequestDelegate;I)I

    .line 417
    return-void

    .line 349
    .end local v0    # "tm":Landroid/telephony/TelephonyManager;
    .end local v2    # "simcardAvailable":Z
    .end local v4    # "params":Landroid/os/Bundle;
    .end local v5    # "allowCall":Z
    .end local v6    # "req":Lim/tpelyyftgw/tgnet/TLRPC$TL_account_sendConfirmPhoneCode;
    .end local v7    # "preferences":Landroid/content/SharedPreferences;
    :cond_d0
    :goto_d0
    return-void
.end method

.method public onShow()V
    .registers 1

    .line 426
    invoke-super {p0}, Lim/tpelyyftgw/ui/components/SlideView;->onShow()V

    .line 427
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/CancelAccountDeletionActivity$PhoneView;->onNextPressed()V

    .line 428
    return-void
.end method