bg.smali

.class public Lcom/xiaomi/push/service/bg;
.super Lcom/xiaomi/push/service/XMPushService$i;


# 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$i;-><init>(I)V

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

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

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

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

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

    return-void
.end method


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

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

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

    move-result-object v1

    if-nez v1, :cond_30

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

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

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

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

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

    move-result-object v0

    :goto_14
    if-nez v0, :cond_32

    const-string v0, "no account for mipush"

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

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

    const v1, 0x42c1d82

    const-string v2, "no account."

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

    :cond_25
    :goto_25
    return-void

    :catch_26
    move-exception v0

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

    move-object v0, v1

    goto :goto_14

    :catch_2c
    move-exception v0

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

    :cond_30
    move-object v0, v1

    goto :goto_14

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

    move-result-object v1

    const-string v2, "5"

    invoke-virtual {v1, v2}, Lcom/xiaomi/push/service/al;->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_78

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

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

    move-result-object v0

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

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

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

    move-result-object v1

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

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

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

    move-result v1

    if-eqz v1, :cond_99

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

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

    if-ne v1, v2, :cond_83

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

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

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

    invoke-static {v0, v1, v2}, Lcom/xiaomi/push/service/bp;->a(Lcom/xiaomi/push/service/XMPushService;Ljava/lang/String;[B)V
    :try_end_6b
    .catch Lcom/xiaomi/push/hb; {:try_start_5c .. :try_end_6b} :catch_6c

    goto :goto_25

    :catch_6c
    move-exception v0

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

    iget-object v1, p0, Lcom/xiaomi/push/service/bg;->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_25

    :cond_78
    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/al$b;

    goto :goto_54

    :cond_83
    :try_start_83
    iget-object v1, v0, Lcom/xiaomi/push/service/al$b;->m:Lcom/xiaomi/push/service/al$c;

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

    if-ne v1, v2, :cond_25

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

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

    iget-object v3, p0, Lcom/xiaomi/push/service/bg;->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/al$b;)V

    invoke-virtual {v1, v2}, Lcom/xiaomi/push/service/XMPushService;->a(Lcom/xiaomi/push/service/XMPushService$i;)V
    :try_end_98
    .catch Lcom/xiaomi/push/hb; {:try_start_83 .. :try_end_98} :catch_6c

    goto :goto_25

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

    const/4 v1, 0x1

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

    goto :goto_25
.end method

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

    const-string v0, "register app"

    return-object v0
.end method