140 lines
3.9 KiB
Smali
140 lines
3.9 KiB
Smali
.class final Lcom/google/android/gms/internal/ads/zzazf;
|
|
.super Ljava/lang/Object;
|
|
.source "com.google.android.gms:play-services-ads@@19.1.0"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/concurrent/Callable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Object;",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final synthetic val$context:Landroid/content/Context;
|
|
|
|
.field private final synthetic zzdyn:Landroid/content/Context;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/android/gms/internal/ads/zzazd;Landroid/content/Context;Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p2, p0, Lcom/google/android/gms/internal/ads/zzazf;->zzdyn:Landroid/content/Context;
|
|
|
|
iput-object p3, p0, Lcom/google/android/gms/internal/ads/zzazf;->val$context:Landroid/content/Context;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final synthetic call()Ljava/lang/Object;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/Exception;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/gms/internal/ads/zzazf;->zzdyn:Landroid/content/Context;
|
|
|
|
const-string v1, "admob_user_agent"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "Attempting to read user agent from Google Play Services."
|
|
|
|
.line 2
|
|
invoke-static {v0}, Lcom/google/android/gms/internal/ads/zzawr;->zzeg(Ljava/lang/String;)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/android/gms/internal/ads/zzazf;->zzdyn:Landroid/content/Context;
|
|
|
|
.line 4
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "Attempting to read user agent from local cache."
|
|
|
|
.line 5
|
|
invoke-static {v0}, Lcom/google/android/gms/internal/ads/zzawr;->zzeg(Ljava/lang/String;)V
|
|
|
|
.line 6
|
|
iget-object v0, p0, Lcom/google/android/gms/internal/ads/zzazf;->val$context:Landroid/content/Context;
|
|
|
|
.line 7
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:goto_0
|
|
const-string v1, "user_agent"
|
|
|
|
const-string v3, ""
|
|
|
|
.line 8
|
|
invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 9
|
|
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
const-string v3, "Reading user agent from WebSettings"
|
|
|
|
.line 10
|
|
invoke-static {v3}, Lcom/google/android/gms/internal/ads/zzawr;->zzeg(Ljava/lang/String;)V
|
|
|
|
.line 11
|
|
iget-object v3, p0, Lcom/google/android/gms/internal/ads/zzazf;->val$context:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Landroid/webkit/WebSettings;->getDefaultUserAgent(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 12
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
const-string v0, "Persisting user agent."
|
|
|
|
.line 13
|
|
invoke-static {v0}, Lcom/google/android/gms/internal/ads/zzawr;->zzeg(Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
return-object v3
|
|
.end method
|