granularity level: instruction
.class public final Ld0/a;
.super Ljava/lang/Object;
.source "SourceFile"
.field public static final b:Ljava/lang/Object;
.field public static volatile c:Ld0/a;
.field public a:Ljava/util/concurrent/ConcurrentHashMap;
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Ld0/a;->b:Ljava/lang/Object;
return-void
.end method
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
iput-object v0, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
return-void
.end method
.method public static a()Ld0/a;
.locals 2
sget-object v0, Ld0/a;->c:Ld0/a;
if-nez v0, :cond_1
sget-object v0, Ld0/a;->b:Ljava/lang/Object;
monitor-enter v0
:try_start_0
sget-object v1, Ld0/a;->c:Ld0/a;
if-nez v1, :cond_0
new-instance v1, Ld0/a;
invoke-direct {v1}, Ld0/a;-><init>()V
sput-object v1, Ld0/a;->c:Ld0/a;
:cond_0
monitor-exit v0
goto :goto_0
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
:goto_0
:cond_1
sget-object v0, Ld0/a;->c:Ld0/a;
invoke-static {v0}, Lp0/a;->j(Ljava/lang/Object;)V
return-object v0
.end method
.method public final b(Landroid/content/Context;Landroid/content/ServiceConnection;)V
.locals 1
instance-of v0, p2, La0/e0;
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_0
iget-object v0, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {v0, p2}, Ljava/util/concurrent/ConcurrentHashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
:try_start_0
iget-object v0, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {v0, p2}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/ServiceConnection;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
invoke-virtual {p1, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
:try_end_1
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/lang/IllegalStateException; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/util/NoSuchElementException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catch_0
iget-object p1, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p1, p2}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
return-void
:catchall_0
move-exception p1
iget-object v0, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {v0, p2}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
throw p1
:try_start_2
:cond_0
invoke-virtual {p1, p2}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
:try_end_2
.catch Ljava/lang/IllegalArgumentException; {:try_start_2 .. :try_end_2} :catch_1
.catch Ljava/lang/IllegalStateException; {:try_start_2 .. :try_end_2} :catch_1
.catch Ljava/util/NoSuchElementException; {:try_start_2 .. :try_end_2} :catch_1
:catch_1
return-void
.end method
.method public final c(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
.locals 4
invoke-virtual {p3}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;
move-result-object v0
const-string v1, "ConnectionTracker"
const/4 v2, 0x0
if-nez v0, :cond_0
goto :goto_0
:cond_0
invoke-virtual {v0}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v0
const-string v3, "com.google.android.gms"
invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
:try_start_0
invoke-static {p1}, Lf0/b;->a(Landroid/content/Context;)Lj1/c;
move-result-object v3
iget-object v3, v3, Lj1/c;->a:Ljava/lang/Object;
check-cast v3, Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
invoke-virtual {v3, v0, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
move-result-object v0
iget v0, v0, Landroid/content/pm/ApplicationInfo;->flags:I
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
const/high16 v3, 0x200000
and-int/2addr v0, v3
if-eqz v0, :cond_1
const-string p1, "Attempted to bind to a service in a STOPPED package."
invoke-static {v1, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v2
:goto_0
:catch_0
:cond_1
instance-of v0, p4, La0/e0;
const/4 v3, 0x1
xor-int/2addr v0, v3
if-eqz v0, :cond_4
iget-object v0, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {v0, p4, p4}, Ljava/util/concurrent/ConcurrentHashMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/ServiceConnection;
if-eqz v0, :cond_2
if-eq p4, v0, :cond_2
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
aput-object p4, v0, v2
aput-object p2, v0, v3
const/4 p2, 0x2
invoke-virtual {p3}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v3
aput-object v3, v0, p2
const-string p2, "Duplicate binding with the same ServiceConnection: %s, %s, %s."
invoke-static {p2, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-static {v1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:try_start_1
:cond_2
invoke-virtual {p1, p3, p4, p5}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz p1, :cond_3
goto :goto_1
:cond_3
iget-object p1, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p1, p4, p4}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z
return v2
:catchall_0
move-exception p1
iget-object p2, p0, Ld0/a;->a:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p2, p4, p4}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z
throw p1
:cond_4
invoke-virtual {p1, p3, p4, p5}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
:goto_1
return p1
.end method