275 lines
6.8 KiB
Smali
275 lines
6.8 KiB
Smali
.class final Lio/fabric/sdk/android/a/b/d;
|
|
.super Ljava/lang/Object;
|
|
.source "AdvertisingInfoReflectionStrategy.java"
|
|
|
|
# interfaces
|
|
.implements Lio/fabric/sdk/android/a/b/f;
|
|
|
|
|
|
# instance fields
|
|
.field private final context:Landroid/content/Context;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lio/fabric/sdk/android/a/b/d;->context:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static aI(Landroid/content/Context;)Z
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "com.google.android.gms.common.GooglePlayServicesUtil"
|
|
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "isGooglePlayServicesAvailable"
|
|
|
|
const/4 v3, 0x1
|
|
|
|
new-array v4, v3, [Ljava/lang/Class;
|
|
|
|
const-class v5, Landroid/content/Context;
|
|
|
|
aput-object v5, v4, v0
|
|
|
|
invoke-virtual {v1, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v4, v3, [Ljava/lang/Object;
|
|
|
|
aput-object p0, v4, v0
|
|
|
|
invoke-virtual {v1, v2, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v3
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private getInfo()Ljava/lang/Object;
|
|
.locals 7
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "com.google.android.gms.ads.identifier.AdvertisingIdClient"
|
|
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "getAdvertisingIdInfo"
|
|
|
|
const/4 v3, 0x1
|
|
|
|
new-array v4, v3, [Ljava/lang/Class;
|
|
|
|
const-class v5, Landroid/content/Context;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
aput-object v5, v4, v6
|
|
|
|
invoke-virtual {v1, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v2, v3, [Ljava/lang/Object;
|
|
|
|
iget-object v3, p0, Lio/fabric/sdk/android/a/b/d;->context:Landroid/content/Context;
|
|
|
|
aput-object v3, v2, v6
|
|
|
|
invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->ya()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Fabric"
|
|
|
|
const-string v3, "Could not call getAdvertisingIdInfo on com.google.android.gms.ads.identifier.AdvertisingIdClient"
|
|
|
|
invoke-interface {v1, v2, v3}, Lio/fabric/sdk/android/l;->w(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private isLimitAdTrackingEnabled()Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"
|
|
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "isLimitAdTrackingEnabled"
|
|
|
|
new-array v3, v0, [Ljava/lang/Class;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p0}, Lio/fabric/sdk/android/a/b/d;->getInfo()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
new-array v3, v0, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->ya()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Fabric"
|
|
|
|
const-string v3, "Could not call isLimitAdTrackingEnabled on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"
|
|
|
|
invoke-interface {v1, v2, v3}, Lio/fabric/sdk/android/l;->w(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private ys()Ljava/lang/String;
|
|
.locals 4
|
|
|
|
:try_start_0
|
|
const-string v0, "com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"
|
|
|
|
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "getId"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v3, v2, [Ljava/lang/Class;
|
|
|
|
invoke-virtual {v0, v1, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0}, Lio/fabric/sdk/android/a/b/d;->getInfo()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->ya()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Fabric"
|
|
|
|
const-string v2, "Could not call getId on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"
|
|
|
|
invoke-interface {v0, v1, v2}, Lio/fabric/sdk/android/l;->w(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final yr()Lio/fabric/sdk/android/a/b/b;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lio/fabric/sdk/android/a/b/d;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lio/fabric/sdk/android/a/b/d;->aI(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Lio/fabric/sdk/android/a/b/b;
|
|
|
|
invoke-direct {p0}, Lio/fabric/sdk/android/a/b/d;->ys()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p0}, Lio/fabric/sdk/android/a/b/d;->isLimitAdTrackingEnabled()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v0, v1, v2}, Lio/fabric/sdk/android/a/b/b;-><init>(Ljava/lang/String;Z)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|