113 lines
3.3 KiB
Smali
113 lines
3.3 KiB
Smali
.class public abstract Lcom/singular/sdk/internal/ExternalAIFAHelper;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingInfo;,
|
|
Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingServiceConnection;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public static getAIFA(Landroid/content/Context;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 35
|
|
:try_start_0
|
|
invoke-static {p0}, Lcom/singular/sdk/internal/ExternalAIFAHelper;->queryAdvertisingIdFromService(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p0
|
|
|
|
:catch_0
|
|
const-string p0, "Singular/ExtAIFAHelper"
|
|
|
|
const-string v0, "Could not determine AIFA"
|
|
|
|
.line 40
|
|
invoke-static {p0, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static queryAdvertisingIdFromService(Landroid/content/Context;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 56
|
|
new-instance v0, Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingServiceConnection;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingServiceConnection;-><init>(Lcom/singular/sdk/internal/ExternalAIFAHelper$1;)V
|
|
|
|
.line 57
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
const-string v2, "com.google.android.gms.ads.identifier.service.START"
|
|
|
|
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v2, "com.google.android.gms"
|
|
|
|
.line 58
|
|
invoke-virtual {v1, v2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 59
|
|
invoke-virtual {p0, v1, v0, v2}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 61
|
|
:try_start_0
|
|
invoke-virtual {v0}, Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingServiceConnection;->getBinder()Landroid/os/IBinder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingInfo$GoogleAdvertisingInfoBinder;->Create(Landroid/os/IBinder;)Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingInfo;
|
|
|
|
move-result-object v1
|
|
|
|
.line 62
|
|
invoke-interface {v1}, Lcom/singular/sdk/internal/ExternalAIFAHelper$GoogleAdvertisingInfo;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 65
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
|
|
|
.line 66
|
|
throw v1
|
|
|
|
.line 65
|
|
:catch_0
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
|
|
|
:cond_0
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
.end method
|