GoogleAuthUtil.smali
.class public final Lcom/google/android/gms/auth/GoogleAuthUtil;
.super Lcom/google/android/gms/auth/zzd;
# static fields
.field public static final CHANGE_TYPE_ACCOUNT_ADDED:I = 0x1
.field public static final CHANGE_TYPE_ACCOUNT_REMOVED:I = 0x2
.field public static final CHANGE_TYPE_ACCOUNT_RENAMED_FROM:I = 0x3
.field public static final CHANGE_TYPE_ACCOUNT_RENAMED_TO:I = 0x4
.field public static final GOOGLE_ACCOUNT_TYPE:Ljava/lang/String; = "com.google"
.field private static final KEY_ANDROID_PACKAGE_NAME:Ljava/lang/String;
.field private static final KEY_CALLER_UID:Ljava/lang/String;
.field public static final KEY_SUPPRESS_PROGRESS_SCREEN:Ljava/lang/String; = "suppressProgressScreen"
.field public static final WORK_ACCOUNT_TYPE:Ljava/lang/String; = "com.google.work"
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 67
sget-object v0, Lcom/google/android/gms/auth/zzd;->KEY_CALLER_UID:Ljava/lang/String;
sput-object v0, Lcom/google/android/gms/auth/GoogleAuthUtil;->KEY_CALLER_UID:Ljava/lang/String;
.line 68
sget-object v0, Lcom/google/android/gms/auth/zzd;->KEY_ANDROID_PACKAGE_NAME:Ljava/lang/String;
sput-object v0, Lcom/google/android/gms/auth/GoogleAuthUtil;->KEY_ANDROID_PACKAGE_NAME:Ljava/lang/String;
return-void
.end method
.method private constructor <init>()V
.registers 1
.line 53
invoke-direct {p0}, Lcom/google/android/gms/auth/zzd;-><init>()V
return-void
.end method
.method public static clearToken(Landroid/content/Context;Ljava/lang/String;)V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/android/gms/auth/GooglePlayServicesAvailabilityException;,
Lcom/google/android/gms/auth/GoogleAuthException;,
Ljava/io/IOException;
}
.end annotation
.line 61
invoke-static {p0, p1}, Lcom/google/android/gms/auth/zzd;->clearToken(Landroid/content/Context;Ljava/lang/String;)V
return-void
.end method
.method public static getAccountChangeEvents(Landroid/content/Context;ILjava/lang/String;)Ljava/util/List;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"I",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Lcom/google/android/gms/auth/AccountChangeEvent;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/android/gms/auth/GoogleAuthException;,
Ljava/io/IOException;
}
.end annotation
.line 63
invoke-static {p0, p1, p2}, Lcom/google/android/gms/auth/zzd;->getAccountChangeEvents(Landroid/content/Context;ILjava/lang/String;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method public static getAccountId(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/android/gms/auth/GoogleAuthException;,
Ljava/io/IOException;
}
.end annotation
.line 64
invoke-static {p0, p1}, Lcom/google/android/gms/auth/zzd;->getAccountId(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getToken(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;)Ljava/lang/String;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableAuthException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
.line 57
invoke-static {p0, p1, p2}, Lcom/google/android/gms/auth/zzd;->getToken(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getToken(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableAuthException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
.line 58
invoke-static {p0, p1, p2, p3}, Lcom/google/android/gms/auth/zzd;->getToken(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getToken(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableAuthException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 55
invoke-static {p0, p1, p2}, Lcom/google/android/gms/auth/zzd;->getToken(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getToken(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableAuthException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 56
invoke-static {p0, p1, p2, p3}, Lcom/google/android/gms/auth/zzd;->getToken(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getTokenWithNotification(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableNotifiedException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
if-nez p3, :cond_7
.line 9
new-instance p3, Landroid/os/Bundle;
invoke-direct {p3}, Landroid/os/Bundle;-><init>()V
:cond_7
const/4 v0, 0x1
const-string v1, "handle_notification"
.line 10
invoke-virtual {p3, v1, v0}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
.line 11
invoke-static {p0, p1, p2, p3}, Lcom/google/android/gms/auth/GoogleAuthUtil;->zza(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Lcom/google/android/gms/auth/TokenData;
move-result-object p0
.line 12
invoke-virtual {p0}, Lcom/google/android/gms/auth/TokenData;->zzb()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getTokenWithNotification(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;Landroid/content/Intent;)Ljava/lang/String;
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableNotifiedException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
if-eqz p4, :cond_2c
const/4 v0, 0x1
.line 16
invoke-virtual {p4, v0}, Landroid/content/Intent;->toUri(I)Ljava/lang/String;
move-result-object v1
.line 17
:try_start_7
invoke-static {v1, v0}, Landroid/content/Intent;->parseUri(Ljava/lang/String;I)Landroid/content/Intent;
:try_end_a
.catch Ljava/net/URISyntaxException; {:try_start_7 .. :try_end_a} :catch_24
if-nez p3, :cond_11
.line 21
new-instance p3, Landroid/os/Bundle;
invoke-direct {p3}, Landroid/os/Bundle;-><init>()V
:cond_11
const-string v1, "callback_intent"
.line 22
invoke-virtual {p3, v1, p4}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
const-string p4, "handle_notification"
.line 23
invoke-virtual {p3, p4, v0}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
.line 25
invoke-static {p0, p1, p2, p3}, Lcom/google/android/gms/auth/GoogleAuthUtil;->zza(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Lcom/google/android/gms/auth/TokenData;
move-result-object p0
.line 26
invoke-virtual {p0}, Lcom/google/android/gms/auth/TokenData;->zzb()Ljava/lang/String;
move-result-object p0
return-object p0
.line 20
:catch_24
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Parameter callback contains invalid data. It must be serializable using toUri() and parseUri()."
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.line 15
:cond_2c
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Callback cannot be null."
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static getTokenWithNotification(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableNotifiedException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
const-string v0, "Authority cannot be empty or null."
.line 27
invoke-static {p4, v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotEmpty(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
if-nez p3, :cond_c
.line 28
new-instance p3, Landroid/os/Bundle;
invoke-direct {p3}, Landroid/os/Bundle;-><init>()V
:cond_c
if-nez p5, :cond_13
.line 29
new-instance p5, Landroid/os/Bundle;
invoke-direct {p5}, Landroid/os/Bundle;-><init>()V
.line 30
:cond_13
invoke-static {p5}, Landroid/content/ContentResolver;->validateSyncExtrasBundle(Landroid/os/Bundle;)V
const-string v0, "authority"
.line 31
invoke-virtual {p3, v0, p4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string p4, "sync_extras"
.line 32
invoke-virtual {p3, p4, p5}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
const/4 p4, 0x1
const-string p5, "handle_notification"
.line 33
invoke-virtual {p3, p5, p4}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
.line 35
invoke-static {p0, p1, p2, p3}, Lcom/google/android/gms/auth/GoogleAuthUtil;->zza(Landroid/content/Context;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Lcom/google/android/gms/auth/TokenData;
move-result-object p0
.line 36
invoke-virtual {p0}, Lcom/google/android/gms/auth/TokenData;->zzb()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static getTokenWithNotification(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Lcom/google/android/gms/auth/UserRecoverableNotifiedException;,
Lcom/google/android/gms/auth/GoogleAuthException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 1
new-instance v0, Landroid/accounts/Account;
const