GooglePlayServicesUtilLight.smali
.class public Lcom/google/android/gms/common/GooglePlayServicesUtilLight;
.super Ljava/lang/Object;
# annotations
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
# static fields
.field public static final GMS_AVAILABILITY_NOTIFICATION_ID:I = 0x28c4
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final GMS_GENERAL_ERROR_NOTIFICATION_ID:I = 0x9b6d
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final GOOGLE_PLAY_GAMES_PACKAGE:Ljava/lang/String; = "com.google.android.play.games"
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final GOOGLE_PLAY_SERVICES_PACKAGE:Ljava/lang/String; = "com.google.android.gms"
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
.field public static final GOOGLE_PLAY_SERVICES_VERSION_CODE:I = 0xbdfcb8
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
.field public static final GOOGLE_PLAY_STORE_PACKAGE:Ljava/lang/String; = "com.android.vending"
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final sCanceledAvailabilityNotification:Ljava/util/concurrent/atomic/AtomicBoolean;
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.end field
.field public static zzah:Z
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.end field
.field public static zzai:Z
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.end field
.field public static zzaj:Z
.field public static zzak:Z
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.end field
.field public static final zzal:Ljava/util/concurrent/atomic/AtomicBoolean;
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
sput-object v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->sCanceledAvailabilityNotification:Ljava/util/concurrent/atomic/AtomicBoolean;
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
sput-object v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzal:Ljava/util/concurrent/atomic/AtomicBoolean;
return-void
.end method
.method public constructor <init>()V
.registers 1
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static cancelAvailabilityErrorNotifications(Landroid/content/Context;)V
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
sget-object v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->sCanceledAvailabilityNotification:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z
move-result v0
if-eqz v0, :cond_a
return-void
:cond_a
:try_start_a
const-string v0, "notification"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/app/NotificationManager;
if-eqz p0, :cond_19
const/16 v0, 0x28c4
invoke-virtual {p0, v0}, Landroid/app/NotificationManager;->cancel(I)V
:try_end_19
.catch Ljava/lang/SecurityException; {:try_start_a .. :try_end_19} :catch_19
:catch_19
:cond_19
return-void
.end method
.method public static enableUsingApkIndependentContext()V
.registers 2
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
sget-object v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzal:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
return-void
.end method
.method public static ensurePlayServicesAvailable(Landroid/content/Context;I)V
.registers 4
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/android/gms/common/GooglePlayServicesRepairableException;,
Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
move-result-object v0
invoke-virtual {v0, p0, p1}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->isGooglePlayServicesAvailable(Landroid/content/Context;I)I
move-result p1
if-eqz p1, :cond_3c
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
move-result-object v0
const-string v1, "e"
invoke-virtual {v0, p0, p1, v1}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionIntent(Landroid/content/Context;ILjava/lang/String;)Landroid/content/Intent;
move-result-object p0
const/16 v0, 0x39
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "GooglePlayServices not available due to error "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "GooglePlayServicesUtil"
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
if-nez p0, :cond_34
new-instance p0, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
invoke-direct {p0, p1}, Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;-><init>(I)V
throw p0
:cond_34
new-instance v0, Lcom/google/android/gms/common/GooglePlayServicesRepairableException;
const-string v1, "Google Play Services not available"
invoke-direct {v0, p1, v1, p0}, Lcom/google/android/gms/common/GooglePlayServicesRepairableException;-><init>(ILjava/lang/String;Landroid/content/Intent;)V
throw v0
:cond_3c
return-void
.end method
.method public static getApkVersion(Landroid/content/Context;)I
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
:try_start_1
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object p0
const-string v1, "com.google.android.gms"
invoke-virtual {p0, v1, v0}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object p0
:try_end_b
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_b} :catch_e
iget p0, p0, Landroid/content/pm/PackageInfo;->versionCode:I
return p0
:catch_e
const-string p0, "GooglePlayServicesUtil"
const-string v1, "Google Play services is missing."
invoke-static {p0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v0
.end method
.method public static getClientVersion(Landroid/content/Context;)I
.registers 2
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x1
invoke-static {v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkState(Z)V
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v0
invoke-static {p0, v0}, Lcom/google/android/gms/common/util/ClientLibraryUtils;->getClientVersion(Landroid/content/Context;Ljava/lang/String;)I
move-result p0
return p0
.end method
.method public static getErrorPendingIntent(ILandroid/content/Context;I)Landroid/app/PendingIntent;
.registers 4
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
move-result-object v0
invoke-virtual {v0, p1, p0, p2}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionPendingIntent(Landroid/content/Context;II)Landroid/app/PendingIntent;
move-result-object p0
return-object p0
.end method
.method public static getErrorString(I)Ljava/lang/String;
.registers 1
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {p0}, Lcom/google/android/gms/common/ConnectionResult;->zza(I)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getGooglePlayServicesAvailabilityRecoveryIntent(I)Landroid/content/Intent;
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1, p0, v1}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionIntent(Landroid/content/Context;ILjava/lang/String;)Landroid/content/Intent;
move-result-object p0
return-object p0
.end method
.method public static getRemoteContext(Landroid/content/Context;)Landroid/content/Context;
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
:try_start_0
const-string v0, "com.google.android.gms"
const/4 v1, 0x3
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->createPackageContext(Ljava/lang/String;I)Landroid/content/Context;
move-result-object p0
:try_end_7
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_7} :catch_8
return-object p0
:catch_8
const/4 p0, 0x0
return-object p0
.end method
.method public static getRemoteResource(Landroid/content/Context;)Landroid/content/res/Resources;
.registers 2
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object p0
const-string v0, "com.google.android.gms"
invoke-virtual {p0, v0}, Landroid/content/pm/PackageManager;->getResourcesForApplication(Ljava/lang/String;)Landroid/content/res/Resources;
move-result-object p0
:try_end_a
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_a} :catch_b
return-object p0
:catch_b
const/4 p0, 0x0
return-object p0
.end method
.method public static honorsDebugCertificates(Landroid/content/Context;)Z
.registers 6
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
sget-boolean v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzak:Z
const/4 v1, 0x0
const/4 v2, 0x1
if-nez v0, :cond_3b
:try_start_6
invoke-static {p0}, Lcom/google/android/gms/common/wrappers/Wrappers;->packageManager(Landroid/content/Context;)Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;
move-result-object v0
const-string v3, "com.google.android.gms"
const/16 v4, 0x40
invoke-virtual {v0, v3, v4}, Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v0
invoke-static {p0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->getInstance(Landroid/content/Context;)Lcom/google/android/gms/common/GoogleSignatureVerifier;
if-eqz v0, :cond_26
invoke-static {v0, v1}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result p0
if-nez p0, :cond_26
invoke-static {v0, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result p0
if-eqz p0, :cond_26
sput-boolean v2, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzaj:Z
goto :goto_28
:cond_26
sput-boolean v1, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzaj:Z
:try_end_28
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_6 .. :try_end_28} :catch_2d
.catchall {:try_start_6 .. :try_end_28} :catchall_2b
:goto_28
sput-boolean v2, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzak:Z
goto :goto_3b
:catchall_2b
move-exception p0
goto :goto_38
:catch_2d
move-exception p0
:try_start_2e
const-string v0, "GooglePlayServicesUtil"
const-string v3, "Cannot find Google Play services package name."
invoke-static {v0, v3, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_35
.catchall {:try_start_2e .. :try_end_35} :catchall_2b
sput-boolean v2, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzak:Z
goto :goto_3b
:goto_38
sput-boolean v2, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzak:Z
throw p0
:cond_3b
:goto_3b
sget-boolean p0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzaj:Z
if-nez p0, :cond_47
invoke-static {}, Lcom/google/android/gms/common/util/DeviceProperties;->isUserBuild()Z
move-result p0
if-nez p0, :cond_46
goto :goto_47
:cond_46
return v1
:cond_47
:goto_47
return v2
.end method
.method public static isGooglePlayServicesAvailable(Landroid/content/Context;)I
.registers 2
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/HideFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
sget v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
invoke-static {p0, v0}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isGooglePlayServicesAvailable(Landroid/content/Context;I)I
move-result p0
return p0
.end method
.method public static isGooglePlayServicesAvailable(Landroid/content/Context;I)I
.registers 5
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Lcom/google/android/gms/common/R$string;->common_google_play_services_unknown_issue:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
:try_end_9
.catchall {:try_start_0 .. :try_end_9} :catchall_a
goto :goto_11
:catchall_a
const-string v0, "GooglePlayServicesUtil"
const-string v1, "The Google Play services resources were not found. Check your project configuration to ensure that the resources are included."
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:goto_11
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v0
const-string v1, "com.google.android.gms"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_60
sget-object v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zzal:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v0
if-nez v0, :cond_60
invoke-static {p0}, Lcom/google/android/gms/common/internal/zzp;->zzd(Landroid/content/Context;)I
move-result v0
if-eqz v0, :cond_58
sget v1, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
if-ne v0, v1, :cond_30
goto :goto_60
:cond_30
new-instance p0, Ljava/lang/IllegalStateException;
sget p1, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
const/16 v1, 0x140
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v1, "The meta-data tag in your app\'s AndroidManifest.xml does not have the right value. Expected "
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " but found "
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, ". You must have the following declaration within the <application> element: <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />"
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_58
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "A required meta-data tag in your app\'s AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />"
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_60
:goto_60
invoke-static {p0}, Lcom/google/android/gms/common/util/DeviceProperties;->isWearableWithoutPlayStore(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_6e
invoke-static {p0}, Lcom/google/android/gms/common/util/DeviceProperties;->zzf(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_6e
const/4 v0, 0x1
goto :goto_6f
:cond_6e
const/4 v0, 0x0
:goto_6f
invoke-static {p0, v0, p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zza(Landroid/content/Context;ZI)I
move-result p0
return p0
.end method
.method public static isGooglePlayServicesUid(Landroid/content/Context;I)Z
.registers 2
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {p0, p1}, Lcom/google/android/gms/common/util/UidVerifier;->isGooglePlayServicesUid(Landroid/content/Context;I)Z
move-result p0
return p0
.end method
.method public static isPlayServicesPossiblyUpdating(Landroid/content/Context;I)Z
.registers 4
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x1
const/16 v1, 0x12
if-ne p1, v1, :cond_6
return v0
:cond_6
if-ne p1, v0, :cond_f
const-string p1, "com.google.android.gms"
invoke-static {p0, p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isUninstalledAppPossiblyUpdating(Landroid/content/Context;Ljava/lang/String;)Z
move-result p0
return p0
:cond_f
const/4 p0, 0x0
return p0
.end method
.method public static isPlayStorePossiblyUpdating(Landroid/content/Context;I)Z
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/16 v0, 0x9
if-ne p1, v0, :cond_b
const-string p1, "com.android.vending"
invoke-static {p0, p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isUninstalledAppPossiblyUpdating(Landroid/content/Context;Ljava/lang/String;)Z
move-result p0
return p0
:cond_b
const/4 p0, 0x0
return p0
.end method
.method public static isRestrictedUserProfile(Landroid/content/Context;)Z
.registers 2
.annotation build Landroid/annotation/TargetApi;
value = 0x12
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
invoke-static {}, Lcom/google/android/gms/common/util/PlatformVersion;->isAtLeastJellyBeanMR2()Z
move-result v0
if-eqz v0, :cond_28
const-string v0, "user"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/UserManager;
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Landroid/os/UserManager;->getApplicationRestrictions(Ljava/lang/String;)Landroid/os/Bundle;
move-result-object p0
if-eqz p0, :cond_28
const-string v0, "restricted_profile"
invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
const-string v0, "true"
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_28
const/4 p0, 0x1
return p0
:cond_28
const/4 p0, 0x0
return p0
.end method
.method public static isSidewinderDevice(Landroid/content/Context;)Z
.registers 1
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {p0}, Lcom/google/android/gms/common/util/DeviceProperties;->isSidewinder(Landroid/content/Context;)Z
move-result p0
return p0
.end method
.method public static isUninstalledAppPossiblyUpdating(Landroid/content/Context;Ljava/lang/String;)Z
.registers 7
.annotation build Landroid/annotation/TargetApi;
value = 0x15
.end annotation
const-string v0, "com.google.android.gms"
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
invoke-static {}, Lcom/google/android/gms/common/util/PlatformVersion;->isAtLeastLollipop()Z
move-result v1
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_36
:try_start_e
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v1
invoke-virtual {v1}, Landroid/content/pm/PackageManager;->getPackageInstaller()Landroid/content/pm/PackageInstaller;
move-result-object v1
invoke-virtual {v1}, Landroid/content/pm/PackageInstaller;->getAllSessions()Ljava/util/List;
move-result-object v1
:try_end_1a
.catch Ljava/lang/Exception; {:try_start_e .. :try_end_1a} :catch_35
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_1e
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_36
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Landroid/content/pm/PackageInstaller$SessionInfo;
invoke-virtual {v4}, Landroid/content/pm/PackageInstaller$SessionInfo;->getAppPackageName()Ljava/lang/String;
move-result-object v4
invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1e
return v2
:catch_35
return v3
:cond_36
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v1
const/16 v4, 0x2000
:try_start_3c
invoke-virtual {v1, p1, v4}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
move-result-object p1
if-eqz v0, :cond_45
iget-boolean p0, p1, Landroid/content/pm/ApplicationInfo;->enabled:Z
return p0
:cond_45
iget-boolean p1, p1, Landroid/content/pm/ApplicationInfo;->enabled:Z
if-eqz p1, :cond_50
invoke-static {p0}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isRestrictedUserProfile(Landroid/content/Context;)Z
move-result p0
:try_end_4d
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_3c .. :try_end_4d} :catch_50
if-nez p0, :cond_50
return v2
:catch_50
:cond_50
return v3
.end method
.method public static isUserRecoverableError(I)Z
.registers 3
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x1
if-eq p0, v0, :cond_f
const/4 v1, 0x2
if-eq p0, v1, :cond_f
const/4 v1, 0x3
if-eq p0, v1, :cond_f
const/16 v1, 0x9
if-eq p0, v1, :cond_f
const/4 p0, 0x0
return p0
:cond_f
return v0
.end method
.method public static uidHasPackageName(Landroid/content/Context;ILjava/lang/String;)Z
.registers 3
.annotation build Landroid/annotation/TargetApi;
value = 0x13
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-static {p0, p1, p2}, Lcom/google/android/gms/common/util/UidVerifier;->uidHasPackageName(Landroid/content/Context;ILjava/lang/String;)Z
move-result p0
return p0
.end method
.method public static zza(Landroid/content/Context;ZI)I
.registers 11
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation
const-string v0, "com.google.android.gms"
const/4 v1, 0x1
const/4 v2, 0x0
if-ltz p2, :cond_8
const/4 v3, 0x1
goto :goto_9
:cond_8
const/4 v3, 0x0
:goto_9
invoke-static {v3}, Lcom/google/android/gms/common/internal/Preconditions;->checkArgument(Z)V
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
const/4 v4, 0x0
const/16 v5, 0x9
const-string v6, "GooglePlayServicesUtil"
if-eqz p1, :cond_26
:try_start_17
const-string v4, "com.android.vending"
const/16 v7, 0x2040
invoke-virtual {v3, v4, v7}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v4
:try_end_1f
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_17 .. :try_end_1f} :catch_20
goto :goto_26
:catch_20
const-string p0, "Google Play Store is missing."
invoke-static {v6, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v5
:cond_26
:goto_26
const/16 v7, 0x40
:try_start_28
invoke-virtual {v3, v0, v7}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v7
:try_end_2c
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_28 .. :try_end_2c} :catch_9c
invoke-static {p0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->getInstance(Landroid/content/Context;)Lcom/google/android/gms/common/GoogleSignatureVerifier;
invoke-static {v7, v1}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result p0
if-nez p0, :cond_3b
const-string p0, "Google Play services signature invalid."
invoke-static {v6, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v5
:cond_3b
if-eqz p1, :cond_57
invoke-static {v4, v1}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result p0
if-eqz p0, :cond_51
iget-object p0, v4, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object p0, p0, v2
iget-object p1, v7, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object p1, p1, v2
invoke-virtual {p0, p1}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result p0
if-nez p0, :cond_57
:cond_51
const-string p0, "Google Play Store signature invalid."
invoke-static {v6, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v5
:cond_57
iget p0, v7, Landroid/content/pm/PackageInfo;->versionCode:I
invoke-static {p0}, Lcom/google/android/gms/common/util/zzb;->zzc(I)I
move-result p0
invoke-static {p2}, Lcom/google/android/gms/common/util/zzb;->zzc(I)I
move-result p1
if-ge p0, p1, :cond_85
iget p0, v7, Landroid/content/pm/PackageInfo;->versionCode:I
const/16 p1, 0x4d
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, p1}, Ljava/lang/StringBuilder;-><init>(I)V
const-string p1, "Google Play services out of date. Requires "
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " but found "
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-static {v6, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
const/4 p0, 0x2
return p0
:cond_85
iget-object p0, v7, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
if-nez p0, :cond_95
:try_start_89
invoke-virtual {v3, v0, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
move-result-object p0
:try_end_8d
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_89 .. :try_end_8d} :catch_8e
goto :goto_95
:catch_8e
move-exception p0
const-string p1, "Google Play services missing when getting application info."
invoke-static {v6, p1, p0}, Landroid/util/Log;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return v1
:cond_95
:goto_95
iget-boolean p0, p0, Landroid/content/pm/ApplicationInfo;->enabled:Z
if-nez p0, :cond_9b
const/4 p0, 0x3
return p0
:cond_9b
return v2
:catch_9c
const-string p0, "Google Play services is missing."
invoke-static {v6, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return v1
.end method