granularity level: instruction
.class public final synthetic Lh1/k;
.super Ljava/lang/Object;
.source "SourceFile"
.implements Ljava/util/concurrent/Callable;
.field public final synthetic a:Landroid/content/Context;
.field public final synthetic b:Landroid/content/Intent;
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/content/Intent;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lh1/k;->a:Landroid/content/Context;
iput-object p2, p0, Lh1/k;->b:Landroid/content/Intent;
return-void
.end method
.method public final call()Ljava/lang/Object;
.locals 9
iget-object v0, p0, Lh1/k;->a:Landroid/content/Context;
iget-object v1, p0, Lh1/k;->b:Landroid/content/Intent;
invoke-static {}, Lh1/z;->a()Lh1/z;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
const-string v3, "FirebaseMessaging"
const/4 v4, 0x3
invoke-static {v3, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v3
if-eqz v3, :cond_0
const-string v3, "FirebaseMessaging"
const-string v5, "Starting service"
invoke-static {v3, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
iget-object v3, v2, Lh1/z;->d:Ljava/lang/Object;
check-cast v3, Ljava/util/Queue;
invoke-interface {v3, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
new-instance v1, Landroid/content/Intent;
const-string v3, "com.google.firebase.MESSAGING_EVENT"
invoke-direct {v1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
monitor-enter v2
:try_start_0
iget-object v3, v2, Lh1/z;->a:Ljava/lang/Object;
move-object v5, v3
check-cast v5, Ljava/lang/String;
if-eqz v5, :cond_1
check-cast v3, Ljava/lang/String;
goto :goto_1
:cond_1
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
const/4 v5, 0x0
invoke-virtual {v3, v1, v5}, Landroid/content/pm/PackageManager;->resolveService(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
move-result-object v3
const/4 v5, 0x0
if-eqz v3, :cond_6
iget-object v3, v3, Landroid/content/pm/ResolveInfo;->serviceInfo:Landroid/content/pm/ServiceInfo;
if-nez v3, :cond_2
goto :goto_3
:cond_2
invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v6
iget-object v7, v3, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_5
iget-object v6, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;
if-nez v6, :cond_3
goto :goto_2
:cond_3
const-string v5, "."
invoke-virtual {v6, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_4
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
goto :goto_0
:cond_4
iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;
:goto_0
iput-object v3, v2, Lh1/z;->a:Ljava/lang/Object;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:goto_1
monitor-exit v2
move-object v5, v3
goto :goto_5
:try_start_1
:goto_2
:cond_5
const-string v6, "FirebaseMessaging"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "Error resolving target intent service, skipping classname enforcement. Resolved service was: "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v8, v3, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v8, "/"
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v6, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_4
:goto_3
:cond_6
const-string v3, "FirebaseMessaging"
const-string v6, "Failed to resolve target intent service, skipping classname enforcement"
invoke-static {v3, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:goto_4
monitor-exit v2
:goto_5
if-eqz v5, :cond_8
const-string v3, "FirebaseMessaging"
invoke-static {v3, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v3
if-eqz v3, :cond_7
const-string v3, "FirebaseMessaging"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Restricting intent to a specific service: "
invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_7
invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
:try_start_2
:cond_8
invoke-virtual {v2, v0}, Lh1/z;->c(Landroid/content/Context;)Z
move-result v2
if-eqz v2, :cond_9
invoke-static {v0, v1}, Lh1/j0;->b(Landroid/content/Context;Landroid/content/Intent;)Landroid/content/ComponentName;
move-result-object v0
goto :goto_6
:cond_9
invoke-virtual {v0, v1}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
move-result-object v0
const-string v1, "FirebaseMessaging"
const-string v2, "Missing wake lock permission, service start may be delayed"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:goto_6
if-nez v0, :cond_a
const-string v0, "FirebaseMessaging"
const-string v1, "Error while delivering the message: ServiceIntent not found."
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_2
.catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_1
.catch Ljava/lang/IllegalStateException; {:try_start_2 .. :try_end_2} :catch_0
const/16 v0, 0x194
goto :goto_7
:cond_a
const/4 v0, -0x1
goto :goto_7
:catch_0
move-exception v0
const-string v1, "FirebaseMessaging"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Failed to start service while in background: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
const/16 v0, 0x192
goto :goto_7
:catch_1
move-exception v0
const-string v1, "FirebaseMessaging"
const-string v2, "Error while delivering the message to the serviceIntent"
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
const/16 v0, 0x191
:goto_7
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
return-object v0
:catchall_0
move-exception v0
monitor-exit v2
throw v0
.end method