granularity level: instruction

		.class public Lcom/google/android/gms/security/ProviderInstaller;
.super Ljava/lang/Object;
.source "com.google.android.gms:play-services-basement@@18.1.0"

.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/android/gms/security/ProviderInstaller$ProviderInstallListener;
}
.end annotation

.field public static final PROVIDER_NAME:Ljava/lang/String; = "GmsCore_OpenSSL"
.field private static final zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
.field private static final zzb:Ljava/lang/Object;
.field private static zzc:Ljava/lang/reflect/Method;
.field private static zzd:Ljava/lang/reflect/Method;


.method static constructor <clinit>()V
	.locals 1

	invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
	move-result-object v0
	sput-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
	new-instance v0, Ljava/lang/Object;
	invoke-direct {v0}, Ljava/lang/Object;-><init>()V
	sput-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zzb:Ljava/lang/Object;
	const/4 v0, 0x0
	sput-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zzc:Ljava/lang/reflect/Method;
	sput-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zzd:Ljava/lang/reflect/Method;
	return-void
.end method

.method public constructor <init>()V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method public static installIfNeeded(Landroid/content/Context;)V
	.locals 14
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Lcom/google/android/gms/common/GooglePlayServicesRepairableException;,
	Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
	}
	.end annotation

	const-string v0, "Context must not be null"
	invoke-static {p0, v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	sget-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
	const v1, 0xb5f608
	invoke-virtual {v0, p0, v1}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->verifyGooglePlayServicesIsAvailable(Landroid/content/Context;I)V
	sget-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zzb:Ljava/lang/Object;
	monitor-enter v0
	:try_start_0
	invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
	move-result-wide v1
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	const/4 v3, 0x0
	:try_start_1
	sget-object v4, Lcom/google/android/gms/dynamite/DynamiteModule;->PREFER_HIGHEST_OR_LOCAL_VERSION_NO_FORCE_STAGING:Lcom/google/android/gms/dynamite/DynamiteModule$VersionPolicy;
	const-string v5, "com.google.android.gms.providerinstaller.dynamite"
	invoke-static {p0, v4, v5}, Lcom/google/android/gms/dynamite/DynamiteModule;->load(Landroid/content/Context;Lcom/google/android/gms/dynamite/DynamiteModule$VersionPolicy;Ljava/lang/String;)Lcom/google/android/gms/dynamite/DynamiteModule;
	move-result-object v4
	invoke-virtual {v4}, Lcom/google/android/gms/dynamite/DynamiteModule;->getModuleContext()Landroid/content/Context;
	move-result-object v4
	:try_end_1
	.catch Lcom/google/android/gms/dynamite/DynamiteModule$LoadingException; {:try_start_1 .. :try_end_1} :catch_0
	.catchall {:try_start_1 .. :try_end_1} :catchall_0
	goto :goto_0
	:catch_0
	move-exception v4
	:try_start_2
	const-string v5, "ProviderInstaller"
	const-string v6, "Failed to load providerinstaller module: "
	invoke-virtual {v4}, Lcom/google/android/gms/dynamite/DynamiteModule$LoadingException;->getMessage()Ljava/lang/String;
	move-result-object v4
	invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v4
	invoke-virtual {v6, v4}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v4
	invoke-static {v5, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	move-object v4, v3
	:goto_0
	if-nez v4, :cond_3
	invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
	move-result-wide v4
	invoke-static {p0}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->getRemoteContext(Landroid/content/Context;)Landroid/content/Context;
	move-result-object v6
	:try_end_2
	.catchall {:try_start_2 .. :try_end_2} :catchall_0
	if-eqz v6, :cond_1
	:try_start_3
	sget-object v7, Lcom/google/android/gms/security/ProviderInstaller;->zzd:Ljava/lang/reflect/Method;
	const/4 v8, 0x2
	const/4 v9, 0x1
	const/4 v10, 0x0
	const/4 v11, 0x3
	if-nez v7, :cond_0
	new-array v7, v11, [Ljava/lang/Class;
	const-class v12, Landroid/content/Context;
	aput-object v12, v7, v10
	sget-object v12, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
	aput-object v12, v7, v9
	sget-object v12, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
	aput-object v12, v7, v8
	const-string v12, "com.google.android.gms.common.security.ProviderInstallerImpl"
	const-string v13, "reportRequestStats"
	invoke-static {v6, v12, v13, v7}, Lcom/google/android/gms/security/ProviderInstaller;->zzb(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
	move-result-object v7
	sput-object v7, Lcom/google/android/gms/security/ProviderInstaller;->zzd:Ljava/lang/reflect/Method;
	:cond_0
	sget-object v7, Lcom/google/android/gms/security/ProviderInstaller;->zzd:Ljava/lang/reflect/Method;
	new-array v11, v11, [Ljava/lang/Object;
	aput-object p0, v11, v10
	invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	aput-object v1, v11, v9
	invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	aput-object v1, v11, v8
	invoke-virtual {v7, v3, v11}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
	:try_end_3
	.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
	.catchall {:try_start_3 .. :try_end_3} :catchall_0
	goto :goto_1
	:catch_1
	move-exception v1
	:try_start_4
	const-string v2, "ProviderInstaller"
	const-string v3, "Failed to report request stats: "
	invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
	move-result-object v1
	invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v1
	invoke-virtual {v3, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v1
	invoke-static {v2, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:goto_1
	:cond_1
	if-eqz v6, :cond_2
	const-string v1, "com.google.android.gms.common.security.ProviderInstallerImpl"
	invoke-static {v6, p0, v1}, Lcom/google/android/gms/security/ProviderInstaller;->zzc(Landroid/content/Context;Landroid/content/Context;Ljava/lang/String;)V
	monitor-exit v0
	return-void
	:cond_2
	const-string p0, "ProviderInstaller"
	const-string v1, "Failed to get remote context"
	invoke-static {p0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	new-instance p0, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
	const/16 v1, 0x8
	invoke-direct {p0, v1}, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;-><init>(I)V
	throw p0
	:cond_3
	const-string v1, "com.google.android.gms.providerinstaller.ProviderInstallerImpl"
	invoke-static {v4, p0, v1}, Lcom/google/android/gms/security/ProviderInstaller;->zzc(Landroid/content/Context;Landroid/content/Context;Ljava/lang/String;)V
	monitor-exit v0
	return-void
	:catchall_0
	move-exception p0
	monitor-exit v0
	:try_end_4
	.catchall {:try_start_4 .. :try_end_4} :catchall_0
	throw p0
.end method

.method public static installIfNeededAsync(Landroid/content/Context;Lcom/google/android/gms/security/ProviderInstaller$ProviderInstallListener;)V
	.locals 1

	const-string v0, "Context must not be null"
	invoke-static {p0, v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	const-string v0, "Listener must not be null"
	invoke-static {p1, v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	const-string v0, "Must be called on the UI thread"
	invoke-static {v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkMainThread(Ljava/lang/String;)V
	new-instance v0, Lcom/google/android/gms/security/zza;
	invoke-direct {v0, p0, p1}, Lcom/google/android/gms/security/zza;-><init>(Landroid/content/Context;Lcom/google/android/gms/security/ProviderInstaller$ProviderInstallListener;)V
	const/4 p0, 0x0
	new-array p0, p0, [Ljava/lang/Void;
	invoke-virtual {v0, p0}, Landroid/os/AsyncTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;
	return-void
.end method

.method static bridge synthetic zza()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
	.locals 1

	sget-object v0, Lcom/google/android/gms/security/ProviderInstaller;->zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
	return-object v0
.end method

.method private static zzb(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
	.locals 0
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/lang/ClassNotFoundException;,
	Ljava/lang/NoSuchMethodException;
	}
	.end annotation

	invoke-virtual {p0}, Landroid/content/Context;->getClassLoader()Ljava/lang/ClassLoader;
	move-result-object p0
	invoke-virtual {p0, p1}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
	move-result-object p0
	invoke-virtual {p0, p2, p3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
	move-result-object p0
	return-object p0
.end method

.method private static zzc(Landroid/content/Context;Landroid/content/Context;Ljava/lang/String;)V
	.locals 3
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
	}
	.end annotation

	:try_start_0
	sget-object p1, Lcom/google/android/gms/security/ProviderInstaller;->zzc:Ljava/lang/reflect/Method;
	const/4 v0, 0x0
	const/4 v1, 0x1
	if-nez p1, :cond_0
	new-array p1, v1, [Ljava/lang/Class;
	const-class v2, Landroid/content/Context;
	aput-object v2, p1, v0
	const-string v2, "insertProvider"
	invoke-static {p0, p2, v2, p1}, Lcom/google/android/gms/security/ProviderInstaller;->zzb(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
	move-result-object p1
	sput-object p1, Lcom/google/android/gms/security/ProviderInstaller;->zzc:Ljava/lang/reflect/Method;
	:cond_0
	sget-object p1, Lcom/google/android/gms/security/ProviderInstaller;->zzc:Ljava/lang/reflect/Method;
	new-array p2, v1, [Ljava/lang/Object;
	aput-object p0, p2, v0
	const/4 p0, 0x0
	invoke-virtual {p1, p0, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
	:try_end_0
	.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
	return-void
	:catch_0
	move-exception p0
	invoke-virtual {p0}, Ljava/lang/Exception;->getCause()Ljava/lang/Throwable;
	move-result-object p1
	const/4 p2, 0x6
	const-string v0, "ProviderInstaller"
	invoke-static {v0, p2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result p2
	if-eqz p2, :cond_2
	if-nez p1, :cond_1
	invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
	move-result-object p0
	goto :goto_0
	:cond_1
	invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
	move-result-object p0
	:goto_0
	invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object p0
	const-string p1, "Failed to install provider: "
	invoke-virtual {p1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	invoke-static {v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	:cond_2
	new-instance p0, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
	const/16 p1, 0x8
	invoke-direct {p0, p1}, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;-><init>(I)V
	throw p0
.end method