granularity level: instruction
.class public Lcom/google/android/gms/common/stats/ConnectionTracker;
.super Ljava/lang/Object;
.source "com.google.android.gms:play-services-basement@@18.1.0"
.field private static final zzb:Ljava/lang/Object;
.field private static volatile zzc:Lcom/google/android/gms/common/stats/ConnectionTracker;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field public zza:Ljava/util/concurrent/ConcurrentHashMap;
.method static constructor <clinit>()V
.locals 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzb:Ljava/lang/Object;
return-void
.end method
.method private 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, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza:Ljava/util/concurrent/ConcurrentHashMap;
return-void
.end method
.method public static getInstance()Lcom/google/android/gms/common/stats/ConnectionTracker;
.locals 2
sget-object v0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc:Lcom/google/android/gms/common/stats/ConnectionTracker;
if-nez v0, :cond_1
sget-object v0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzb:Ljava/lang/Object;
monitor-enter v0
:try_start_0
sget-object v1, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc:Lcom/google/android/gms/common/stats/ConnectionTracker;
if-nez v1, :cond_0
new-instance v1, Lcom/google/android/gms/common/stats/ConnectionTracker;
invoke-direct {v1}, Lcom/google/android/gms/common/stats/ConnectionTracker;-><init>()V
sput-object v1, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc:Lcom/google/android/gms/common/stats/ConnectionTracker;
: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, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc:Lcom/google/android/gms/common/stats/ConnectionTracker;
invoke-static {v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
return-object v0
.end method
.method private static zzb(Landroid/content/Context;Landroid/content/ServiceConnection;)V
.locals 0
:try_start_0
invoke-virtual {p0, p1}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/util/NoSuchElementException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method private final zzc(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;IZLjava/util/concurrent/Executor;)Z
.locals 3
.param p7 # Ljava/util/concurrent/Executor;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
invoke-virtual {p3}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;
move-result-object p6
const-string v0, "ConnectionTracker"
const/4 v1, 0x0
if-nez p6, :cond_0
goto :goto_0
:cond_0
invoke-virtual {p6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object p6
const-string v2, "com.google.android.gms"
invoke-virtual {v2, p6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
:try_start_0
invoke-static {p1}, Lcom/google/android/gms/common/wrappers/Wrappers;->packageManager(Landroid/content/Context;)Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;
move-result-object v2
invoke-virtual {v2, p6, v1}, Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
move-result-object p6
iget p6, p6, 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 v2, 0x200000
and-int/2addr p6, v2
if-eqz p6, :cond_1
const-string p1, "Attempted to bind to a service in a STOPPED package."
invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v1
:catch_0
nop
:goto_0
:cond_1
invoke-static {p4}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzd(Landroid/content/ServiceConnection;)Z
move-result p6
if-eqz p6, :cond_4
iget-object p6, p0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p6, p4, p4}, Ljava/util/concurrent/ConcurrentHashMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p6
check-cast p6, Landroid/content/ServiceConnection;
if-eqz p6, :cond_2
if-eq p4, p6, :cond_2
const/4 p6, 0x3
new-array p6, p6, [Ljava/lang/Object;
aput-object p4, p6, v1
const/4 v2, 0x1
aput-object p2, p6, v2
const/4 p2, 0x2
invoke-virtual {p3}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v2
aput-object v2, p6, p2
const-string p2, "Duplicate binding with the same ServiceConnection: %s, %s, %s."
invoke-static {p2, p6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-static {v0, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:try_start_1
:cond_2
invoke-static {p1, p3, p4, p5, p7}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zze(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;ILjava/util/concurrent/Executor;)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, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {p1, p4, p4}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z
return v1
:catchall_0
move-exception p1
iget-object p2, p0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza: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-static {p1, p3, p4, p5, p7}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zze(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;ILjava/util/concurrent/Executor;)Z
move-result p1
:goto_1
return p1
.end method
.method private static zzd(Landroid/content/ServiceConnection;)Z
.locals 0
instance-of p0, p0, Lcom/google/android/gms/common/internal/zzs;
if-nez p0, :cond_0
const/4 p0, 0x1
return p0
:cond_0
const/4 p0, 0x0
return p0
.end method
.method private static final zze(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;ILjava/util/concurrent/Executor;)Z
.locals 1
.param p4 # Ljava/util/concurrent/Executor;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
invoke-static {}, Lcom/google/android/gms/common/util/PlatformVersion;->isAtLeastQ()Z
move-result v0
if-eqz v0, :cond_0
if-eqz p4, :cond_0
invoke-virtual {p0, p1, p3, p4, p2}, Landroid/content/Context;->bindService(Landroid/content/Intent;ILjava/util/concurrent/Executor;Landroid/content/ServiceConnection;)Z
move-result p0
return p0
:cond_0
invoke-virtual {p0, p1, p2, p3}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p0
return p0
.end method
.method public bindService(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
.locals 9
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v3
const/4 v7, 0x1
const/4 v8, 0x0
move-object v1, p0
move-object v2, p1
move-object v4, p2
move-object v5, p3
move v6, p4
invoke-direct/range {v1 .. v8}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;IZLjava/util/concurrent/Executor;)Z
move-result p1
return p1
.end method
.method public unbindService(Landroid/content/Context;Landroid/content/ServiceConnection;)V
.locals 1
invoke-static {p2}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzd(Landroid/content/ServiceConnection;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza: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, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza: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;
invoke-static {p1, v0}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzb(Landroid/content/Context;Landroid/content/ServiceConnection;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object p1, p0, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza: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, Lcom/google/android/gms/common/stats/ConnectionTracker;->zza:Ljava/util/concurrent/ConcurrentHashMap;
invoke-virtual {v0, p2}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
throw p1
:cond_0
invoke-static {p1, p2}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzb(Landroid/content/Context;Landroid/content/ServiceConnection;)V
return-void
.end method
.method public unbindServiceSafe(Landroid/content/Context;Landroid/content/ServiceConnection;)V
.locals 0
:try_start_0
invoke-virtual {p0, p1, p2}, Lcom/google/android/gms/common/stats/ConnectionTracker;->unbindService(Landroid/content/Context;Landroid/content/ServiceConnection;)V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method public final zza(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;ILjava/util/concurrent/Executor;)Z
.locals 8
.param p6 # Ljava/util/concurrent/Executor;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
const/4 v6, 0x1
move-object v0, p0
move-object v1, p1
move-object v2, p2
move-object v3, p3
move-object v4, p4
move v5, p5
move-object v7, p6
invoke-direct/range {v0 .. v7}, Lcom/google/android/gms/common/stats/ConnectionTracker;->zzc(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;IZLjava/util/concurrent/Executor;)Z
move-result p1
return p1
.end method