bk.smali

.class Lcom/xiaomi/push/service/bk;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/accounts/OnAccountsUpdateListener;


# instance fields
.field final synthetic a:Lcom/xiaomi/push/service/bj;


# direct methods
.method constructor <init>(Lcom/xiaomi/push/service/bj;)V
    .registers 2

    iput-object p1, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

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

    return-void
.end method


# virtual methods
.method public onAccountsUpdated([Landroid/accounts/Account;)V
    .registers 9

    const/4 v0, 0x0

    const/4 v2, 0x0

    if-eqz p1, :cond_4d

    array-length v1, p1

    if-lez v1, :cond_4d

    array-length v4, p1

    move v3, v0

    :goto_9
    if-ge v3, v4, :cond_9d

    aget-object v1, p1, v3

    if-eqz v1, :cond_4e

    const-string/jumbo v5, "com.xiaomi"

    iget-object v6, v1, Landroid/accounts/Account;->type:Ljava/lang/String;

    invoke-static {v5, v6}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_4e

    :goto_1a
    if-eqz v1, :cond_25

    iget-object v2, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_25

    const/4 v0, 0x1

    :cond_25
    iget-object v2, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

    invoke-static {v2}, Lcom/xiaomi/push/service/bj;->a(Lcom/xiaomi/push/service/bj;)Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Lcom/xiaomi/push/service/bl;->a(Landroid/content/Context;)Lcom/xiaomi/push/service/bl;

    move-result-object v2

    invoke-virtual {v2}, Lcom/xiaomi/push/service/bl;->c()Z

    move-result v2

    if-eqz v0, :cond_52

    if-nez v2, :cond_52

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

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

    move-result-object v0

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

    move-result-object v0

    iget-object v2, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-virtual {v0, v2}, Lcom/xiaomi/push/service/bl;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

    iget-object v1, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/xiaomi/push/service/bj;->a(Lcom/xiaomi/push/service/bj;Ljava/lang/String;)V

    :cond_4d
    :goto_4d
    return-void

    :cond_4e
    add-int/lit8 v1, v3, 0x1

    move v3, v1

    goto :goto_9

    :cond_52
    if-nez v0, :cond_6c

    if-eqz v2, :cond_6c

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

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

    move-result-object v0

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

    move-result-object v0

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

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

    const-string/jumbo v1, "0"

    invoke-static {v0, v1}, Lcom/xiaomi/push/service/bj;->a(Lcom/xiaomi/push/service/bj;Ljava/lang/String;)V

    goto :goto_4d

    :cond_6c
    if-eqz v0, :cond_4d

    if-eqz v2, :cond_4d

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

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

    move-result-object v0

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

    move-result-object v0

    invoke-virtual {v0}, Lcom/xiaomi/push/service/bl;->b()Ljava/lang/String;

    move-result-object v0

    iget-object v2, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-static {v0, v2}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_4d

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

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

    move-result-object v0

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

    move-result-object v0

    iget-object v2, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-virtual {v0, v2}, Lcom/xiaomi/push/service/bl;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/xiaomi/push/service/bk;->a:Lcom/xiaomi/push/service/bj;

    iget-object v1, v1, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/xiaomi/push/service/bj;->a(Lcom/xiaomi/push/service/bj;Ljava/lang/String;)V

    goto :goto_4d

    :cond_9d
    move-object v1, v2

    goto/16 :goto_1a
.end method