cpr.smali

.class public final Ldxoptimizer/cpr;
.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, Ldxoptimizer/cpr;->a:Lcom/xiaomi/push/service/XMPushService;

    iput-object p2, p0, Ldxoptimizer/cpr;->c:Ljava/lang/String;

    iput-object p5, p0, Ldxoptimizer/cpr;->b:[B

    iput-object p3, p0, Ldxoptimizer/cpr;->d:Ljava/lang/String;

    iput-object p4, p0, Ldxoptimizer/cpr;->e:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public final a()V
    .registers 7

    .prologue
    .line 0
    iget-object v0, p0, Ldxoptimizer/cpr;->a:Lcom/xiaomi/push/service/XMPushService;

    invoke-static {v0}, Ldxoptimizer/cpp;->a(Landroid/content/Context;)Ldxoptimizer/cpo;

    move-result-object v1

    if-nez v1, :cond_30

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

    iget-object v2, p0, Ldxoptimizer/cpr;->c:Ljava/lang/String;

    iget-object v3, p0, Ldxoptimizer/cpr;->d:Ljava/lang/String;

    iget-object v4, p0, Ldxoptimizer/cpr;->e:Ljava/lang/String;

    invoke-static {v0, v2, v3, v4}, Ldxoptimizer/cpp;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ldxoptimizer/cpo;
    :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/baidu/techain/aa/c;->d(Ljava/lang/String;)V

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

    const v1, 0x42c1d82

    const-string v2, "no account."

    invoke-static {v0, v1, v2}, Ldxoptimizer/cps;->a(Landroid/content/Context;ILjava/lang/String;)V

    :cond_25
    :goto_25
    return-void

    :catch_26
    move-exception v0

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

    move-object v0, v1

    goto :goto_14

    :catch_2c
    move-exception v0

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

    :cond_30
    move-object v0, v1

    goto :goto_14

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

    move-result-object v1

    const-string v2, "5"

    invoke-virtual {v1, v2}, Lcom/xiaomi/push/service/m;->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, Ldxoptimizer/cpr;->a:Lcom/xiaomi/push/service/XMPushService;

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

    move-result-object v0

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

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

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

    move-result-object v1

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

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

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

    move-result v1

    if-eqz v1, :cond_9b

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

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

    if-ne v1, v2, :cond_83

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

    iget-object v1, p0, Ldxoptimizer/cpr;->c:Ljava/lang/String;

    iget-object v2, p0, Ldxoptimizer/cpr;->b:[B

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

    goto :goto_25

    :catch_6c
    move-exception v0

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

    iget-object v1, p0, Ldxoptimizer/cpr;->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/m$b;

    goto :goto_54

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

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

    if-ne v1, v2, :cond_25

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

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

    iget-object v3, p0, Ldxoptimizer/cpr;->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/m$b;)V

    .line 1000
    const-wide/16 v4, 0x0

    invoke-virtual {v1, v2, v4, v5}, Lcom/xiaomi/push/service/XMPushService;->a(Lcom/xiaomi/push/service/XMPushService$i;J)V
    :try_end_9a
    .catch Lcom/baidu/techain/af/fz; {:try_start_83 .. :try_end_9a} :catch_6c

    goto :goto_25

    .line 0
    :cond_9b
    iget-object v0, p0, Ldxoptimizer/cpr;->a:Lcom/xiaomi/push/service/XMPushService;

    const/4 v1, 0x1

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

    goto :goto_25
.end method

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

    const-string v0, "register app"

    return-object v0
.end method