VoIPService$4$1$1.smali

.class Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;
.super Ljava/lang/Object;
.source "VoIPService.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->run(Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/TLRPC$TL_error;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

.field final synthetic val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

.field final synthetic val$response:Lim/tpelyyftgw/tgnet/TLObject;


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

    return-void
.end method

.method constructor <init>(Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;Lim/tpelyyftgw/tgnet/TLRPC$TL_error;Lim/tpelyyftgw/tgnet/TLObject;)V
    .registers 4
    .param p1, "this$2"    # Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    .line 307
    iput-object p1, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iput-object p2, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    iput-object p3, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$response:Lim/tpelyyftgw/tgnet/TLObject;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .registers 4

    .line 310
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    if-nez v0, :cond_b6

    .line 311
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    iget-object v1, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$response:Lim/tpelyyftgw/tgnet/TLObject;

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

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$TL_phone_phoneCall;->phone_call:Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;

    invoke-static {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$602(Lim/tpelyyftgw/messenger/voip/VoIPService;Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;)Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;

    .line 312
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    iget-object v1, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v1, v1, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->val$salt:[B

    invoke-static {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$702(Lim/tpelyyftgw/messenger/voip/VoIPService;[B)[B

    .line 313
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    const/16 v1, 0xd

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->dispatchStateChanged(I)V

    .line 314
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$300(Lim/tpelyyftgw/messenger/voip/VoIPService;)Z

    move-result v0

    if-eqz v0, :cond_41

    .line 315
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->hangUp()V

    .line 316
    return-void

    .line 318
    :cond_41
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$800(Lim/tpelyyftgw/messenger/voip/VoIPService;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_8e

    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$600(Lim/tpelyyftgw/messenger/voip/VoIPService;)Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;

    move-result-object v0

    if-eqz v0, :cond_8e

    .line 319
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$800(Lim/tpelyyftgw/messenger/voip/VoIPService;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_6b
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_81

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

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

    .line 320
    .local v1, "call":Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;
    iget-object v2, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v2, v2, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v2, v2, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->onCallUpdated(Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;)V

    .line 321
    .end local v1    # "call":Lim/tpelyyftgw/tgnet/TLRPC$PhoneCall;
    goto :goto_6b

    .line 322
    :cond_81
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->access$800(Lim/tpelyyftgw/messenger/voip/VoIPService;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 324
    :cond_8e
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    new-instance v1, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1$1;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1$1;-><init>(Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;)V

    iput-object v1, v0, Lim/tpelyyftgw/messenger/voip/VoIPService;->timeoutRunnable:Ljava/lang/Runnable;

    .line 353
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService;->timeoutRunnable:Ljava/lang/Runnable;

    iget-object v1, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v1, v1, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v1, v1, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    iget v1, v1, Lim/tpelyyftgw/messenger/voip/VoIPService;->currentAccount:I

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

    move-result-object v1

    iget v1, v1, Lim/tpelyyftgw/messenger/MessagesController;->callReceiveTimeout:I

    int-to-long v1, v1

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

    goto :goto_11c

    .line 355
    :cond_b6
    iget v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$TL_error;->code:I

    const/16 v1, 0x190

    if-ne v0, v1, :cond_d3

    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    iget-object v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$TL_error;->text:Ljava/lang/String;

    const-string v1, "PARTICIPANT_VERSION_OUTDATED"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_d3

    .line 356
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->callFailed(I)V

    goto :goto_11c

    .line 357
    :cond_d3
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    iget v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$TL_error;->code:I

    const/16 v1, 0x193

    if-ne v0, v1, :cond_e6

    .line 358
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    const/4 v1, -0x2

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->callFailed(I)V

    goto :goto_11c

    .line 359
    :cond_e6
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    iget v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$TL_error;->code:I

    const/16 v1, 0x196

    if-ne v0, v1, :cond_f9

    .line 360
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    const/4 v1, -0x3

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/voip/VoIPService;->callFailed(I)V

    goto :goto_11c

    .line 362
    :cond_f9
    sget-boolean v0, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z

    if-eqz v0, :cond_113

    .line 363
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Error on phone.requestCall: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->val$error:Lim/tpelyyftgw/tgnet/TLRPC$TL_error;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V

    .line 365
    :cond_113
    iget-object v0, p0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1$1;->this$2:Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4$1;->this$1:Lim/tpelyyftgw/messenger/voip/VoIPService$4;

    iget-object v0, v0, Lim/tpelyyftgw/messenger/voip/VoIPService$4;->this$0:Lim/tpelyyftgw/messenger/voip/VoIPService;

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/voip/VoIPService;->callFailed()V

    .line 368
    :goto_11c
    return-void
.end method