bp.smali

.class public Lcom/xiaomi/push/service/bp;
.super Lcom/xiaomi/push/service/XMPushService$h;


# instance fields
.field private a:Lcom/xiaomi/push/service/XMPushService;

.field private b:[B

.field private c:Ljava/lang/String;

.field private d:Ljava/lang/String;

.field private e:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lcom/xiaomi/push/service/XMPushService;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[B)V
    .registers 7

    const/16 v0, 0x9

    invoke-direct {p0, v0}, Lcom/xiaomi/push/service/XMPushService$h;-><init>(I)V

    iput-object p1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    iput-object p2, p0, Lcom/xiaomi/push/service/bp;->c:Ljava/lang/String;

    iput-object p5, p0, Lcom/xiaomi/push/service/bp;->b:[B

    iput-object p3, p0, Lcom/xiaomi/push/service/bp;->d:Ljava/lang/String;

    iput-object p4, p0, Lcom/xiaomi/push/service/bp;->e:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public a()V
    .registers 6

    iget-object v0, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-static {v0}, Lcom/xiaomi/push/service/bn;->a(Landroid/content/Context;)Lcom/xiaomi/push/service/bm;

    move-result-object v1

    if-nez v1, :cond_32

    :try_start_8
    iget-object v0, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    iget-object v2, p0, Lcom/xiaomi/push/service/bp;->c:Ljava/lang/String;

    iget-object v3, p0, Lcom/xiaomi/push/service/bp;->d:Ljava/lang/String;

    iget-object v4, p0, Lcom/xiaomi/push/service/bp;->e:Ljava/lang/String;

    invoke-static {v0, v2, v3, v4}, Lcom/xiaomi/push/service/bn;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/xiaomi/push/service/bm;
    :try_end_13
    .catch Ljava/io/IOException; {:try_start_8 .. :try_end_13} :catch_28
    .catch Lorg/json/JSONException; {:try_start_8 .. :try_end_13} :catch_2e

    move-result-object v0

    :goto_14
    if-nez v0, :cond_34

    const-string/jumbo v0, "no account for mipush"

    invoke-static {v0}, Lcom/xiaomi/channel/commonutils/b/c;->d(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    const v1, 0x42c1d82

    const-string/jumbo v2, "no account."

    invoke-static {v0, v1, v2}, Lcom/xiaomi/push/service/bq;->a(Landroid/content/Context;ILjava/lang/String;)V

    :cond_27
    :goto_27
    return-void

    :catch_28
    move-exception v0

    invoke-static {v0}, Lcom/xiaomi/channel/commonutils/b/c;->a(Ljava/lang/Throwable;)V

    move-object v0, v1

    goto :goto_14

    :catch_2e
    move-exception v0

    invoke-static {v0}, Lcom/xiaomi/channel/commonutils/b/c;->a(Ljava/lang/Throwable;)V

    :cond_32
    move-object v0, v1

    goto :goto_14

    :cond_34
    invoke-static {}, Lcom/xiaomi/push/service/ap;->a()Lcom/xiaomi/push/service/ap;

    move-result-object v1

    const-string/jumbo v2, "5"

    invoke-virtual {v1, v2}, Lcom/xiaomi/push/service/ap;->c(Ljava/lang/String;)Ljava/util/Collection;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z

    move-result v2

    if-eqz v2, :cond_7b

    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-virtual {v0, v1}, Lcom/xiaomi/push/service/bm;->a(Lcom/xiaomi/push/service/XMPushService;)Lcom/xiaomi/push/service/ap$b;

    move-result-object v0

    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-static {v1, v0}, Lcom/xiaomi/push/service/g;->a(Lcom/xiaomi/push/service/XMPushService;Lcom/xiaomi/push/service/ap$b;)V

    invoke-static {}, Lcom/xiaomi/push/service/ap;->a()Lcom/xiaomi/push/service/ap;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/xiaomi/push/service/ap;->a(Lcom/xiaomi/push/service/ap$b;)V

    :goto_57
    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-virtual {v1}, Lcom/xiaomi/push/service/XMPushService;->f()Z

    move-result v1

    if-eqz v1, :cond_9c

    :try_start_5f
    iget-object v1, v0, Lcom/xiaomi/push/service/ap$b;->m:Lcom/xiaomi/push/service/ap$c;

    sget-object v2, Lcom/xiaomi/push/service/ap$c;->c:Lcom/xiaomi/push/service/ap$c;

    if-ne v1, v2, :cond_86

    iget-object v0, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->c:Ljava/lang/String;

    iget-object v2, p0, Lcom/xiaomi/push/service/bp;->b:[B

    invoke-static {v0, v1, v2}, Lcom/xiaomi/push/service/g;->a(Lcom/xiaomi/push/service/XMPushService;Ljava/lang/String;[B)V
    :try_end_6e
    .catch Lcom/xiaomi/smack/l; {:try_start_5f .. :try_end_6e} :catch_6f

    goto :goto_27

    :catch_6f
    move-exception v0

    invoke-static {v0}, Lcom/xiaomi/channel/commonutils/b/c;->a(Ljava/lang/Throwable;)V

    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    const/16 v2, 0xa

    invoke-virtual {v1, v2, v0}, Lcom/xiaomi/push/service/XMPushService;->a(ILjava/lang/Exception;)V

    goto :goto_27

    :cond_7b
    invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result-object v0

    check-cast v0, Lcom/xiaomi/push/service/ap$b;

    goto :goto_57

    :cond_86
    :try_start_86
    iget-object v1, v0, Lcom/xiaomi/push/service/ap$b;->m:Lcom/xiaomi/push/service/ap$c;

    sget-object v2, Lcom/xiaomi/push/service/ap$c;->a:Lcom/xiaomi/push/service/ap$c;

    if-ne v1, v2, :cond_27

    iget-object v1, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    new-instance v2, Lcom/xiaomi/push/service/XMPushService$a;

    iget-object v3, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    invoke-direct {v2, v3, v0}, Lcom/xiaomi/push/service/XMPushService$a;-><init>(Lcom/xiaomi/push/service/XMPushService;Lcom/xiaomi/push/service/ap$b;)V

    invoke-virtual {v1, v2}, Lcom/xiaomi/push/service/XMPushService;->a(Lcom/xiaomi/push/service/XMPushService$h;)V
    :try_end_9b
    .catch Lcom/xiaomi/smack/l; {:try_start_86 .. :try_end_9b} :catch_6f

    goto :goto_27

    :cond_9c
    iget-object v0, p0, Lcom/xiaomi/push/service/bp;->a:Lcom/xiaomi/push/service/XMPushService;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/xiaomi/push/service/XMPushService;->a(Z)V

    goto :goto_27
.end method

.method public b()Ljava/lang/String;
    .registers 2

    const-string/jumbo v0, "register app"

    return-object v0
.end method