.class public Lk8/c;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Ljava/util/concurrent/Executor;

.field public final b:Landroid/content/Context;

.field public final c:Lk8/u;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lk8/u;Ljava/util/concurrent/Executor;)V
    .registers 4

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

    iput-object p3, p0, Lk8/c;->a:Ljava/util/concurrent/Executor;

    iput-object p1, p0, Lk8/c;->b:Landroid/content/Context;

    iput-object p2, p0, Lk8/c;->c:Lk8/u;

    return-void
.end method


# virtual methods
.method public a()Z
    .registers 16

    iget-object v0, p0, Lk8/c;->c:Lk8/u;

    const-string v1, "gcm.n.noui"

    invoke-virtual {v0, v1}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x1

    if-eqz v0, :cond_c

    return v1

    .line 1
    :cond_c
    iget-object v0, p0, Lk8/c;->b:Landroid/content/Context;

    const-string v2, "keyguard"

    invoke-virtual {v0, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/KeyguardManager;

    invoke-virtual {v0}, Landroid/app/KeyguardManager;->inKeyguardRestrictedInputMode()Z

    move-result v0

    const/4 v2, 0x0

    if-eqz v0, :cond_1e

    goto :goto_4d

    :cond_1e
    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v0

    iget-object v3, p0, Lk8/c;->b:Landroid/content/Context;

    const-string v4, "activity"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/app/ActivityManager;

    invoke-virtual {v3}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object v3

    if-eqz v3, :cond_4d

    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

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

    move-result v4

    if-eqz v4, :cond_4d

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

    move-result-object v4

    check-cast v4, Landroid/app/ActivityManager$RunningAppProcessInfo;

    iget v5, v4, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    if-ne v5, v0, :cond_36

    iget v0, v4, Landroid/app/ActivityManager$RunningAppProcessInfo;->importance:I

    const/16 v3, 0x64

    if-ne v0, v3, :cond_4d

    goto :goto_4e

    :cond_4d
    :goto_4d
    move v1, v2

    :goto_4e
    if-eqz v1, :cond_51

    return v2

    .line 2
    :cond_51
    iget-object v0, p0, Lk8/c;->c:Lk8/u;

    const-string v1, "gcm.n.image"

    invoke-virtual {v0, v1}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 3
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    const-string v3, "FirebaseMessaging"

    if-eqz v1, :cond_62

    goto :goto_86

    :cond_62
    :try_start_62
    new-instance v1, Lk8/r;

    new-instance v4, Ljava/net/URL;

    invoke-direct {v4, v0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v4}, Lk8/r;-><init>(Ljava/net/URL;)V
    :try_end_6c
    .catch Ljava/net/MalformedURLException; {:try_start_62 .. :try_end_6c} :catch_6d

    goto :goto_87

    :catch_6d
    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "Not downloading image, bad URL: "

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v4

    if-eqz v4, :cond_7e

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

    move-result-object v0

    goto :goto_83

    :cond_7e
    new-instance v0, Ljava/lang/String;

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

    :goto_83
    invoke-static {v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :goto_86
    const/4 v1, 0x0

    :goto_87
    if-eqz v1, :cond_96

    .line 4
    iget-object v0, p0, Lk8/c;->a:Ljava/util/concurrent/Executor;

    .line 5
    new-instance v4, Lz5/r01;

    invoke-direct {v4, v1}, Lz5/r01;-><init>(Lk8/r;)V

    invoke-static {v0, v4}, Ln6/l;->c(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Callable;)Ln6/i;

    move-result-object v0

    iput-object v0, v1, Lk8/r;->s:Ln6/i;

    .line 6
    :cond_96
    iget-object v0, p0, Lk8/c;->b:Landroid/content/Context;

    iget-object v4, p0, Lk8/c;->c:Lk8/u;

    sget-object v5, Lk8/a;->a:Ljava/util/concurrent/atomic/AtomicInteger;

    const-string v5, "Couldn\'t get own application info: "

    .line 7
    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v6

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v7

    const/16 v8, 0x80

    .line 8
    :try_start_a8
    invoke-virtual {v6, v7, v8}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v6

    if-eqz v6, :cond_bf

    iget-object v6, v6, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
    :try_end_b0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_a8 .. :try_end_b0} :catch_b3

    if-eqz v6, :cond_bf

    goto :goto_c1

    :catch_b3
    move-exception v6

    invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-static {v3, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_bf
    sget-object v6, Landroid/os/Bundle;->EMPTY:Landroid/os/Bundle;

    .line 9
    :goto_c1
    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v7

    const-string v8, "gcm.n.android_channel_id"

    .line 10
    invoke-virtual {v4, v8}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 11
    sget v9, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v10, 0x1a

    const/4 v11, 0x3

    if-ge v9, v10, :cond_d4

    goto/16 :goto_159

    :cond_d4
    :try_start_d4
    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v9

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v9, v12, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v9

    iget v9, v9, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
    :try_end_e2
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_d4 .. :try_end_e2} :catch_159

    if-lt v9, v10, :cond_159

    const-class v9, Landroid/app/NotificationManager;

    invoke-virtual {v0, v9}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/app/NotificationManager;

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

    move-result v10

    if-nez v10, :cond_10f

    invoke-virtual {v9, v8}, Landroid/app/NotificationManager;->getNotificationChannel(Ljava/lang/String;)Landroid/app/NotificationChannel;

    move-result-object v10

    if-eqz v10, :cond_f9

    goto :goto_15a

    :cond_f9
    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/String;->length()I

    move-result v10

    new-instance v12, Ljava/lang/StringBuilder;

    add-int/lit8 v10, v10, 0x7a

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

    const-string v10, "Notification Channel requested ("

    const-string v13, ") has not been created by the app. Manifest configuration, or default, value will be used."

    invoke-static {v12, v10, v8, v13, v3}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_10f
    const-string v8, "com.google.firebase.messaging.default_notification_channel_id"

    invoke-virtual {v6, v8}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

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

    move-result v10

    if-nez v10, :cond_125

    invoke-virtual {v9, v8}, Landroid/app/NotificationManager;->getNotificationChannel(Ljava/lang/String;)Landroid/app/NotificationChannel;

    move-result-object v10

    if-eqz v10, :cond_122

    goto :goto_15a

    :cond_122
    const-string v8, "Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used."

    goto :goto_127

    :cond_125
    const-string v8, "Missing Default Notification Channel metadata in AndroidManifest. Default value will be used."

    :goto_127
    invoke-static {v3, v8}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    const-string v8, "fcm_fallback_notification_channel"

    invoke-virtual {v9, v8}, Landroid/app/NotificationManager;->getNotificationChannel(Ljava/lang/String;)Landroid/app/NotificationChannel;

    move-result-object v10

    if-nez v10, :cond_15a

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v10

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v12

    const-string v13, "fcm_fallback_notification_channel_label"

    const-string v14, "string"

    invoke-virtual {v10, v13, v14, v12}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v10

    if-nez v10, :cond_14c

    const-string v10, "String resource \"fcm_fallback_notification_channel_label\" is not found. Using default string channel name."

    invoke-static {v3, v10}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    const-string v10, "Misc"

    goto :goto_150

    :cond_14c
    invoke-virtual {v0, v10}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v10

    :goto_150
    new-instance v12, Landroid/app/NotificationChannel;

    invoke-direct {v12, v8, v10, v11}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    invoke-virtual {v9, v12}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V

    goto :goto_15a

    :catch_159
    :cond_159
    :goto_159
    const/4 v8, 0x0

    .line 12
    :cond_15a
    :goto_15a
    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v10

    .line 13
    new-instance v11, Lb0/l;

    invoke-direct {v11, v0, v8}, Lb0/l;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    const-string v8, "gcm.n.title"

    invoke-virtual {v4, v9, v7, v8}, Lk8/u;->d(Landroid/content/res/Resources;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

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

    move-result v12

    if-nez v12, :cond_176

    invoke-virtual {v11, v8}, Lb0/l;->e(Ljava/lang/CharSequence;)Lb0/l;

    :cond_176
    const-string v8, "gcm.n.body"

    invoke-virtual {v4, v9, v7, v8}, Lk8/u;->d(Landroid/content/res/Resources;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

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

    move-result v12

    if-nez v12, :cond_190

    invoke-virtual {v11, v8}, Lb0/l;->d(Ljava/lang/CharSequence;)Lb0/l;

    new-instance v12, Lb0/k;

    invoke-direct {v12}, Lb0/k;-><init>()V

    invoke-virtual {v12, v8}, Lb0/k;->d(Ljava/lang/CharSequence;)Lb0/k;

    invoke-virtual {v11, v12}, Lb0/l;->g(Lb0/m;)Lb0/l;

    :cond_190
    const-string v8, "gcm.n.icon"

    invoke-virtual {v4, v8}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 14
    invoke-static {v8}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v12

    if-nez v12, :cond_1ce

    const-string v12, "drawable"

    invoke-virtual {v9, v8, v12, v7}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v12

    if-eqz v12, :cond_1aa

    invoke-static {v9, v12}, Lk8/a;->a(Landroid/content/res/Resources;I)Z

    move-result v13

    if-nez v13, :cond_1fd

    :cond_1aa
    const-string v12, "mipmap"

    invoke-virtual {v9, v8, v12, v7}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v12

    if-eqz v12, :cond_1b8

    invoke-static {v9, v12}, Lk8/a;->a(Landroid/content/res/Resources;I)Z

    move-result v13

    if-nez v13, :cond_1fd

    :cond_1b8
    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/String;->length()I

    move-result v12

    new-instance v13, Ljava/lang/StringBuilder;

    add-int/lit8 v12, v12, 0x3d

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

    const-string v12, "Icon resource "

    const-string v14, " not found. Notification will use default icon."

    invoke-static {v13, v12, v8, v14, v3}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_1ce
    const-string v8, "com.google.firebase.messaging.default_notification_icon"

    invoke-virtual {v6, v8, v2}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v8

    if-eqz v8, :cond_1dc

    invoke-static {v9, v8}, Lk8/a;->a(Landroid/content/res/Resources;I)Z

    move-result v12

    if-nez v12, :cond_1f0

    :cond_1dc
    :try_start_1dc
    invoke-virtual {v10, v7, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v12

    iget v5, v12, Landroid/content/pm/ApplicationInfo;->icon:I
    :try_end_1e2
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1dc .. :try_end_1e2} :catch_1e4

    move v12, v5

    goto :goto_1f1

    :catch_1e4
    move-exception v12

    invoke-virtual {v12}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v5, v12}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-static {v3, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_1f0
    move v12, v8

    :goto_1f1
    const v5, 0x1080093

    if-eqz v12, :cond_1fc

    invoke-static {v9, v12}, Lk8/a;->a(Landroid/content/res/Resources;I)Z

    move-result v8

    if-nez v8, :cond_1fd

    :cond_1fc
    move v12, v5

    .line 15
    :cond_1fd
    iget-object v5, v11, Lb0/l;->s:Landroid/app/Notification;

    iput v12, v5, Landroid/app/Notification;->icon:I

    const-string v5, "gcm.n.sound2"

    .line 16
    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    move-result v8

    if-eqz v8, :cond_213

    const-string v5, "gcm.n.sound"

    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 17
    :cond_213
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v8

    const/4 v12, 0x2

    if-eqz v8, :cond_21c

    const/4 v5, 0x0

    goto :goto_261

    :cond_21c
    const-string v8, "default"

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

    move-result v8

    if-nez v8, :cond_25d

    const-string v8, "raw"

    invoke-virtual {v9, v5, v8, v7}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v8

    if-eqz v8, :cond_25d

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v8

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v9

    new-instance v13, Ljava/lang/StringBuilder;

    add-int/lit8 v8, v8, 0x18

    add-int/2addr v8, v9

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

    const-string v8, "android.resource://"

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

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

    const-string v8, "/raw/"

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

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

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

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    goto :goto_261

    :cond_25d
    invoke-static {v12}, Landroid/media/RingtoneManager;->getDefaultUri(I)Landroid/net/Uri;

    move-result-object v5

    :goto_261
    const/4 v8, -0x1

    const/4 v9, 0x4

    if-eqz v5, :cond_27f

    .line 18
    iget-object v13, v11, Lb0/l;->s:Landroid/app/Notification;

    iput-object v5, v13, Landroid/app/Notification;->sound:Landroid/net/Uri;

    iput v8, v13, Landroid/app/Notification;->audioStreamType:I

    new-instance v5, Landroid/media/AudioAttributes$Builder;

    invoke-direct {v5}, Landroid/media/AudioAttributes$Builder;-><init>()V

    invoke-virtual {v5, v9}, Landroid/media/AudioAttributes$Builder;->setContentType(I)Landroid/media/AudioAttributes$Builder;

    move-result-object v5

    const/4 v8, 0x5

    invoke-virtual {v5, v8}, Landroid/media/AudioAttributes$Builder;->setUsage(I)Landroid/media/AudioAttributes$Builder;

    move-result-object v5

    invoke-virtual {v5}, Landroid/media/AudioAttributes$Builder;->build()Landroid/media/AudioAttributes;

    move-result-object v5

    iput-object v5, v13, Landroid/app/Notification;->audioAttributes:Landroid/media/AudioAttributes;

    :cond_27f
    const-string v5, "gcm.n.click_action"

    .line 19
    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    move-result v8

    if-nez v8, :cond_299

    new-instance v8, Landroid/content/Intent;

    invoke-direct {v8, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v7}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    const/high16 v5, 0x10000000

    invoke-virtual {v8, v5}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    goto :goto_2d2

    :cond_299
    const-string v5, "gcm.n.link_android"

    .line 20
    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    move-result v8

    if-eqz v8, :cond_2ab

    const-string v5, "gcm.n.link"

    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    move-result v8

    if-nez v8, :cond_2b6

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    goto :goto_2b7

    :cond_2b6
    const/4 v5, 0x0

    :goto_2b7
    if-eqz v5, :cond_2c7

    .line 21
    new-instance v8, Landroid/content/Intent;

    const-string v9, "android.intent.action.VIEW"

    invoke-direct {v8, v9}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v7}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {v8, v5}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    goto :goto_2d2

    :cond_2c7
    invoke-virtual {v10, v7}, Landroid/content/pm/PackageManager;->getLaunchIntentForPackage(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v8

    if-nez v8, :cond_2d2

    const-string v5, "No activity found to launch app"

    invoke-static {v3, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_2d2
    :goto_2d2
    const/high16 v5, 0x44000000    # 512.0f

    const-string v7, "google.c.a.e"

    if-nez v8, :cond_2da

    const/4 v8, 0x0

    goto :goto_33a

    :cond_2da
    const/high16 v9, 0x4000000

    .line 22
    invoke-virtual {v8, v9}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 23
    new-instance v9, Landroid/os/Bundle;

    iget-object v10, v4, Lk8/u;->a:Landroid/os/Bundle;

    invoke-direct {v9, v10}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V

    iget-object v10, v4, Lk8/u;->a:Landroid/os/Bundle;

    invoke-virtual {v10}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    move-result-object v10

    invoke-interface {v10}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v10

    :cond_2f0
    :goto_2f0
    invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-eqz v13, :cond_31e

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

    move-result-object v13

    check-cast v13, Ljava/lang/String;

    const-string v14, "google.c."

    .line 24
    invoke-virtual {v13, v14}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v14

    if-nez v14, :cond_317

    const-string v14, "gcm.n."

    invoke-virtual {v13, v14}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v14

    if-nez v14, :cond_317

    const-string v14, "gcm.notification."

    invoke-virtual {v13, v14}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_315

    goto :goto_317

    :cond_315
    move v14, v2

    goto :goto_318

    :cond_317
    :goto_317
    const/4 v14, 0x1

    :goto_318
    if-eqz v14, :cond_2f0

    .line 25
    invoke-virtual {v9, v13}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V

    goto :goto_2f0

    .line 26
    :cond_31e
    invoke-virtual {v8, v9}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    .line 27
    invoke-virtual {v4, v7}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_330

    .line 28
    invoke-virtual {v4}, Lk8/u;->g()Landroid/os/Bundle;

    move-result-object v9

    const-string v10, "gcm.n.analytics_data"

    invoke-virtual {v8, v10, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent;

    .line 29
    :cond_330
    sget-object v9, Lk8/a;->a:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v9}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    move-result v9

    .line 30
    invoke-static {v0, v9, v8, v5}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v8

    .line 31
    :goto_33a
    iput-object v8, v11, Lb0/l;->g:Landroid/app/PendingIntent;

    .line 32
    invoke-virtual {v4, v7}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v7

    if-nez v7, :cond_344

    const/4 v5, 0x0

    goto :goto_375

    .line 33
    :cond_344
    new-instance v7, Landroid/content/Intent;

    const-string v8, "com.google.firebase.messaging.NOTIFICATION_DISMISS"

    invoke-direct {v7, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Lk8/u;->g()Landroid/os/Bundle;

    move-result-object v8

    invoke-virtual {v7, v8}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    move-result-object v7

    .line 34
    sget-object v8, Lk8/a;->a:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v8}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    move-result v8

    .line 35
    new-instance v9, Landroid/content/Intent;

    const-string v10, "com.google.firebase.MESSAGING_EVENT"

    invoke-direct {v9, v10}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    new-instance v10, Landroid/content/ComponentName;

    const-string v13, "com.google.firebase.iid.FirebaseInstanceIdReceiver"

    invoke-direct {v10, v0, v13}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v9, v10}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    move-result-object v9

    const-string v10, "wrapped_intent"

    invoke-virtual {v9, v10, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    move-result-object v7

    invoke-static {v0, v8, v7, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v5

    :goto_375
    if-eqz v5, :cond_37b

    .line 36
    iget-object v7, v11, Lb0/l;->s:Landroid/app/Notification;

    iput-object v5, v7, Landroid/app/Notification;->deleteIntent:Landroid/app/PendingIntent;

    :cond_37b
    const-string v5, "gcm.n.color"

    .line 37
    invoke-virtual {v4, v5}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 38
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_3a6

    :try_start_387
    invoke-static {v5}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v7

    invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0
    :try_end_38f
    .catch Ljava/lang/IllegalArgumentException; {:try_start_387 .. :try_end_38f} :catch_390

    goto :goto_3bf

    :catch_390
    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/String;->length()I

    move-result v7

    new-instance v8, Ljava/lang/StringBuilder;

    add-int/lit8 v7, v7, 0x38

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

    const-string v7, "Color is invalid: "

    const-string v9, ". Notification will use default color."

    invoke-static {v8, v7, v5, v9, v3}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_3a6
    const-string v5, "com.google.firebase.messaging.default_notification_color"

    invoke-virtual {v6, v5, v2}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v5

    if-eqz v5, :cond_3be

    :try_start_3ae
    sget-object v6, Lc0/a;->a:Ljava/lang/Object;

    .line 39
    invoke-static {v0, v5}, Lc0/a$c;->a(Landroid/content/Context;I)I

    move-result v0

    .line 40
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0
    :try_end_3b8
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_3ae .. :try_end_3b8} :catch_3b9

    goto :goto_3bf

    :catch_3b9
    const-string v0, "Cannot find the color resource referenced in AndroidManifest."

    invoke-static {v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_3be
    const/4 v0, 0x0

    :goto_3bf
    if-eqz v0, :cond_3c7

    .line 41
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 42
    iput v0, v11, Lb0/l;->o:I

    :cond_3c7
    const-string v0, "gcm.n.sticky"

    .line 43
    invoke-virtual {v4, v0}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v0

    xor-int/lit8 v0, v0, 0x1

    invoke-virtual {v11, v0}, Lb0/l;->c(Z)Lb0/l;

    const-string v0, "gcm.n.local_only"

    invoke-virtual {v4, v0}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v0

    .line 44
    iput-boolean v0, v11, Lb0/l;->m:Z

    const-string v0, "gcm.n.ticker"

    .line 45
    invoke-virtual {v4, v0}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_3ea

    .line 46
    iget-object v5, v11, Lb0/l;->s:Landroid/app/Notification;

    invoke-static {v0}, Lb0/l;->b(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    iput-object v0, v5, Landroid/app/Notification;->tickerText:Ljava/lang/CharSequence;

    :cond_3ea
    const-string v0, "gcm.n.notification_priority"

    .line 47
    invoke-virtual {v4, v0}, Lk8/u;->b(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v0

    const/4 v5, -0x2

    if-nez v0, :cond_3f4

    goto :goto_416

    :cond_3f4
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v6

    if-lt v6, v5, :cond_400

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v6

    if-le v6, v12, :cond_417

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

    move-result-object v0

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v7

    add-int/lit8 v7, v7, 0x48

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

    const-string v7, "notificationPriority is invalid "

    const-string v8, ". Skipping setting notificationPriority."

    invoke-static {v6, v7, v0, v8, v3}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_416
    const/4 v0, 0x0

    :cond_417
    if-eqz v0, :cond_41f

    .line 48
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 49
    iput v0, v11, Lb0/l;->j:I

    :cond_41f
    const-string v0, "gcm.n.visibility"

    .line 50
    invoke-virtual {v4, v0}, Lk8/u;->b(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v0

    const-string v6, "NotificationParams"

    if-nez v0, :cond_42a

    goto :goto_44e

    :cond_42a
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v7

    const/4 v8, -0x1

    if-lt v7, v8, :cond_438

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v7

    const/4 v8, 0x1

    if-le v7, v8, :cond_44f

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

    move-result-object v0

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v8

    add-int/lit8 v8, v8, 0x35

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

    const-string v8, "visibility is invalid: "

    const-string v9, ". Skipping setting visibility."

    invoke-static {v7, v8, v0, v9, v6}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_44e
    const/4 v0, 0x0

    :cond_44f
    if-eqz v0, :cond_457

    .line 51
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 52
    iput v0, v11, Lb0/l;->p:I

    :cond_457
    const-string v0, "gcm.n.notification_count"

    .line 53
    invoke-virtual {v4, v0}, Lk8/u;->b(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v0

    if-nez v0, :cond_460

    goto :goto_47c

    :cond_460
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v7

    if-gez v7, :cond_47d

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

    move-result-object v0

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v8

    add-int/lit8 v8, v8, 0x43

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

    const-string v8, "notificationCount is invalid: "

    const-string v9, ". Skipping setting notificationCount."

    invoke-static {v7, v8, v0, v9, v3}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_47c
    const/4 v0, 0x0

    :cond_47d
    if-eqz v0, :cond_485

    .line 54
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 55
    iput v0, v11, Lb0/l;->i:I

    :cond_485
    const-string v0, "gcm.n.event_time"

    .line 56
    invoke-virtual {v4, v0}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

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

    move-result v8

    if-nez v8, :cond_4c9

    :try_start_491
    invoke-static {v7}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v8

    invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0
    :try_end_499
    .catch Ljava/lang/NumberFormatException; {:try_start_491 .. :try_end_499} :catch_49a

    goto :goto_4ca

    :catch_49a
    invoke-static {v0}, Lk8/u;->h(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v8

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v9

    new-instance v10, Ljava/lang/StringBuilder;

    add-int/lit8 v8, v8, 0x26

    add-int/2addr v8, v9

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

    const-string v8, "Couldn\'t parse value of "

    const-string v9, "("

    invoke-static {v10, v8, v0, v9, v7}, Lb1/f;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, ") into a long"

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

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

    move-result-object v0

    invoke-static {v6, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_4c9
    const/4 v0, 0x0

    :goto_4ca
    if-eqz v0, :cond_4d7

    const/4 v7, 0x1

    .line 57
    iput-boolean v7, v11, Lb0/l;->k:Z

    .line 58
    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v7

    .line 59
    iget-object v0, v11, Lb0/l;->s:Landroid/app/Notification;

    iput-wide v7, v0, Landroid/app/Notification;->when:J

    :cond_4d7
    const-string v0, "gcm.n.vibrate_timings"

    .line 60
    invoke-virtual {v4, v0}, Lk8/u;->c(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v0

    if-nez v0, :cond_4e0

    goto :goto_517

    :cond_4e0
    :try_start_4e0
    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v7

    const/4 v8, 0x1

    if-le v7, v8, :cond_4f9

    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v7

    new-array v8, v7, [J

    move v9, v2

    :goto_4ee
    if-ge v9, v7, :cond_518

    invoke-virtual {v0, v9}, Lorg/json/JSONArray;->optLong(I)J

    move-result-wide v13

    aput-wide v13, v8, v9

    add-int/lit8 v9, v9, 0x1

    goto :goto_4ee

    :cond_4f9
    new-instance v7, Lorg/json/JSONException;

    const-string v8, "vibrateTimings have invalid length"

    invoke-direct {v7, v8}, Lorg/json/JSONException;-><init>(Ljava/lang/String;)V

    throw v7
    :try_end_501
    .catch Lorg/json/JSONException; {:try_start_4e0 .. :try_end_501} :catch_501
    .catch Ljava/lang/NumberFormatException; {:try_start_4e0 .. :try_end_501} :catch_501

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

    move-result-object v0

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v8

    add-int/lit8 v8, v8, 0x4a

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

    const-string v8, "User defined vibrateTimings is invalid: "

    const-string v9, ". Skipping setting vibrateTimings."

    invoke-static {v7, v8, v0, v9, v6}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_517
    const/4 v8, 0x0

    :cond_518
    if-eqz v8, :cond_51e

    .line 61
    iget-object v0, v11, Lb0/l;->s:Landroid/app/Notification;

    iput-object v8, v0, Landroid/app/Notification;->vibrate:[J

    :cond_51e
    const-string v0, ". Skipping setting LightSettings"

    const-string v7, "LightSettings is invalid: "

    const-string v8, "gcm.n.light_settings"

    .line 62
    invoke-virtual {v4, v8}, Lk8/u;->c(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v8

    if-nez v8, :cond_52b

    goto :goto_5a0

    :cond_52b
    const/4 v9, 0x3

    new-array v10, v9, [I

    :try_start_52e
    invoke-virtual {v8}, Lorg/json/JSONArray;->length()I

    move-result v13

    if-ne v13, v9, :cond_558

    invoke-virtual {v8, v2}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v9

    .line 63
    invoke-static {v9}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v9

    const/high16 v13, -0x1000000

    if-eq v9, v13, :cond_550

    aput v9, v10, v2

    const/4 v9, 0x1

    .line 64
    invoke-virtual {v8, v9}, Lorg/json/JSONArray;->optInt(I)I

    move-result v13

    aput v13, v10, v9

    invoke-virtual {v8, v12}, Lorg/json/JSONArray;->optInt(I)I

    move-result v9

    aput v9, v10, v12

    goto :goto_5a1

    .line 65
    :cond_550
    new-instance v9, Ljava/lang/IllegalArgumentException;

    const-string v10, "Transparent color is invalid"

    invoke-direct {v9, v10}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v9

    .line 66
    :cond_558
    new-instance v9, Lorg/json/JSONException;

    const-string v10, "lightSettings don\'t have all three fields"

    invoke-direct {v9, v10}, Lorg/json/JSONException;-><init>(Ljava/lang/String;)V

    throw v9
    :try_end_560
    .catch Lorg/json/JSONException; {:try_start_52e .. :try_end_560} :catch_58a
    .catch Ljava/lang/IllegalArgumentException; {:try_start_52e .. :try_end_560} :catch_560

    :catch_560
    move-exception v9

    invoke-virtual {v8}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v9}, Ljava/lang/IllegalArgumentException;->getMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/String;->length()I

    move-result v10

    new-instance v13, Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v14

    add-int/lit8 v14, v14, 0x3c

    add-int/2addr v14, v10

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

    const-string v10, ". "

    invoke-static {v13, v7, v8, v10, v9}, Lb1/f;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

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

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

    move-result-object v0

    goto :goto_59d

    :catch_58a
    invoke-virtual {v8}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v8

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v10

    add-int/lit8 v10, v10, 0x3a

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

    invoke-static {v9, v7, v8, v0}, Li/b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_59d
    invoke-static {v6, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :goto_5a0
    const/4 v10, 0x0

    :goto_5a1
    if-eqz v10, :cond_5bf

    .line 67
    aget v0, v10, v2

    const/4 v6, 0x1

    aget v6, v10, v6

    aget v7, v10, v12

    .line 68
    iget-object v8, v11, Lb0/l;->s:Landroid/app/Notification;

    iput v0, v8, Landroid/app/Notification;->ledARGB:I

    iput v6, v8, Landroid/app/Notification;->ledOnMS:I

    iput v7, v8, Landroid/app/Notification;->ledOffMS:I

    if-eqz v6, :cond_5b8

    if-eqz v7, :cond_5b8

    const/4 v0, 0x1

    goto :goto_5b9

    :cond_5b8
    move v0, v2

    :goto_5b9
    iget v6, v8, Landroid/app/Notification;->flags:I

    and-int/2addr v5, v6

    or-int/2addr v0, v5

    iput v0, v8, Landroid/app/Notification;->flags:I

    :cond_5bf
    const-string v0, "gcm.n.default_sound"

    .line 69
    invoke-virtual {v4, v0}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v0

    const-string v5, "gcm.n.default_vibrate_timings"

    invoke-virtual {v4, v5}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_5cf

    or-int/lit8 v0, v0, 0x2

    :cond_5cf
    const-string v5, "gcm.n.default_light_settings"

    invoke-virtual {v4, v5}, Lk8/u;->a(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_5d9

    or-int/lit8 v0, v0, 0x4

    .line 70
    :cond_5d9
    iget-object v5, v11, Lb0/l;->s:Landroid/app/Notification;

    iput v0, v5, Landroid/app/Notification;->defaults:I

    and-int/lit8 v0, v0, 0x4

    if-eqz v0, :cond_5e7

    iget v0, v5, Landroid/app/Notification;->flags:I

    or-int/lit8 v0, v0, 0x1

    iput v0, v5, Landroid/app/Notification;->flags:I

    :cond_5e7
    const-string v0, "gcm.n.tag"

    .line 71
    invoke-virtual {v4, v0}, Lk8/u;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

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

    move-result v4

    if-nez v4, :cond_5f4

    goto :goto_60b

    :cond_5f4
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v4

    new-instance v0, Ljava/lang/StringBuilder;

    const/16 v6, 0x25

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

    const-string v6, "FCM-Notification:"

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

    invoke-virtual {v0, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

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

    move-result-object v0

    :goto_60b
    if-nez v1, :cond_60e

    goto :goto_65c

    .line 72
    :cond_60e
    :try_start_60e
    iget-object v4, v1, Lk8/r;->s:Ln6/i;

    const-string v5, "null reference"

    .line 73
    invoke-static {v4, v5}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;

    const-wide/16 v5, 0x5

    .line 74
    sget-object v7, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-static {v4, v5, v6, v7}, Ln6/l;->b(Ln6/i;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/graphics/Bitmap;

    invoke-virtual {v11, v4}, Lb0/l;->f(Landroid/graphics/Bitmap;)Lb0/l;

    new-instance v5, Lb0/j;

    invoke-direct {v5}, Lb0/j;-><init>()V

    .line 75
    iput-object v4, v5, Lb0/j;->b:Landroid/graphics/Bitmap;

    const/4 v4, 0x0

    .line 76
    invoke-virtual {v5, v4}, Lb0/j;->d(Landroid/graphics/Bitmap;)Lb0/j;

    invoke-virtual {v11, v5}, Lb0/l;->g(Lb0/m;)Lb0/l;
    :try_end_630
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_60e .. :try_end_630} :catch_64a
    .catch Ljava/lang/InterruptedException; {:try_start_60e .. :try_end_630} :catch_63a
    .catch Ljava/util/concurrent/TimeoutException; {:try_start_60e .. :try_end_630} :catch_631

    goto :goto_65c

    :catch_631
    const-string v4, "Failed to download image in time, showing notification without it"

    invoke-static {v3, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {v1}, Lk8/r;->close()V

    goto :goto_65c

    :catch_63a
    const-string v4, "Interrupted while downloading image, showing notification without it"

    invoke-static {v3, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {v1}, Lk8/r;->close()V

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Thread;->interrupt()V

    goto :goto_65c

    :catch_64a
    move-exception v1

    invoke-virtual {v1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    const-string v4, "Failed to download image: "

    invoke-virtual {v4, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v3, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :goto_65c
    const/4 v1, 0x3

    .line 77
    invoke-static {v3, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z

    move-result v1

    if-eqz v1, :cond_668

    const-string v1, "Showing notification"

    invoke-static {v3, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_668
    iget-object v1, p0, Lk8/c;->b:Landroid/content/Context;

    const-string v3, "notification"

    invoke-virtual {v1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/NotificationManager;

    invoke-virtual {v11}, Lb0/l;->a()Landroid/app/Notification;

    move-result-object v3

    invoke-virtual {v1, v0, v2, v3}, Landroid/app/NotificationManager;->notify(Ljava/lang/String;ILandroid/app/Notification;)V

    const/4 v0, 0x1

    return v0
.end method
