apkfuckery/com.discord/smali/com/adjust/sdk/t.smali

694 lines
16 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class final Lcom/adjust/sdk/t;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "DeviceInfo.java"
2019-02-04 20:08:30 +00:00
# instance fields
.field clientSdk:Ljava/lang/String;
2019-02-17 02:24:41 +00:00
.field country:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
.field deviceName:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
.field eb:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-03-26 19:13:28 +00:00
.field ec:Ljava/lang/Boolean;
2019-02-04 20:08:30 +00:00
2019-03-26 19:13:28 +00:00
.field private ed:Z
2019-02-04 20:08:30 +00:00
2019-03-26 19:13:28 +00:00
.field ee:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
.field ef:Ljava/lang/String;
2019-02-17 02:24:41 +00:00
.field eg:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
.field eh:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
.field ei:Ljava/lang/String;
.field ej:Ljava/lang/String;
.field ek:Ljava/lang/String;
.field el:Ljava/lang/String;
.field em:Ljava/lang/String;
.field en:Ljava/lang/String;
.field eo:Ljava/lang/String;
.field ep:Ljava/lang/String;
.field eq:Ljava/lang/String;
.field er:Ljava/lang/String;
.field es:Ljava/lang/String;
.field et:Ljava/lang/String;
.field eu:Ljava/lang/String;
.field ev:Ljava/lang/String;
.field ew:Ljava/lang/String;
.field ex:Ljava/lang/String;
2019-02-21 02:16:48 +00:00
.field ey:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
.field ez:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
2019-02-04 20:08:30 +00:00
.field language:Ljava/lang/String;
.field packageName:Ljava/lang/String;
# direct methods
.method constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.locals 8
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
2019-03-26 19:13:28 +00:00
iput-boolean v0, p0, Lcom/adjust/sdk/t;->ed:Z
2019-02-04 20:08:30 +00:00
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v2
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v1
2019-02-17 02:24:41 +00:00
invoke-static {v1}, Lcom/adjust/sdk/az;->c(Landroid/content/res/Configuration;)Ljava/util/Locale;
2019-02-04 20:08:30 +00:00
move-result-object v3
iget v1, v1, Landroid/content/res/Configuration;->screenLayout:I
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
invoke-virtual {p0, p1}, Lcom/adjust/sdk/t;->a(Landroid/content/Context;)V
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v4
iput-object v4, p0, Lcom/adjust/sdk/t;->packageName:Ljava/lang/String;
invoke-static {p1}, Lcom/adjust/sdk/t;->b(Landroid/content/Context;)Ljava/lang/String;
move-result-object v4
2019-03-26 19:13:28 +00:00
iput-object v4, p0, Lcom/adjust/sdk/t;->ei:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
and-int/lit8 v4, v1, 0xf
const/4 v5, 0x0
packed-switch v4, :pswitch_data_0
move-object v6, v5
goto :goto_0
:pswitch_0
const-string v6, "tablet"
goto :goto_0
:pswitch_1
const-string v6, "phone"
:goto_0
2019-03-26 19:13:28 +00:00
iput-object v6, p0, Lcom/adjust/sdk/t;->ej:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
sget-object v6, Landroid/os/Build;->MODEL:Ljava/lang/String;
iput-object v6, p0, Lcom/adjust/sdk/t;->deviceName:Ljava/lang/String;
sget-object v6, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
iput-object v6, p0, Lcom/adjust/sdk/t;->ek:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
const-string v6, "android"
2019-03-26 19:13:28 +00:00
iput-object v6, p0, Lcom/adjust/sdk/t;->el:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
sget-object v6, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
iput-object v6, p0, Lcom/adjust/sdk/t;->em:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
sget v7, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
2019-03-26 19:13:28 +00:00
iput-object v6, p0, Lcom/adjust/sdk/t;->en:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
invoke-virtual {v3}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
move-result-object v6
iput-object v6, p0, Lcom/adjust/sdk/t;->language:Ljava/lang/String;
invoke-virtual {v3}, Ljava/util/Locale;->getCountry()Ljava/lang/String;
move-result-object v3
2019-02-17 02:24:41 +00:00
iput-object v3, p0, Lcom/adjust/sdk/t;->country:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
packed-switch v4, :pswitch_data_1
move-object v3, v5
goto :goto_1
:pswitch_2
const-string v3, "xlarge"
goto :goto_1
:pswitch_3
const-string v3, "large"
goto :goto_1
:pswitch_4
const-string v3, "normal"
goto :goto_1
:pswitch_5
const-string v3, "small"
:goto_1
2019-03-26 19:13:28 +00:00
iput-object v3, p0, Lcom/adjust/sdk/t;->eo:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
and-int/lit8 v1, v1, 0x30
const/16 v3, 0x10
if-eq v1, v3, :cond_1
const/16 v3, 0x20
if-eq v1, v3, :cond_0
move-object v1, v5
goto :goto_2
:cond_0
const-string v1, "long"
goto :goto_2
:cond_1
const-string v1, "normal"
:goto_2
2019-03-26 19:13:28 +00:00
iput-object v1, p0, Lcom/adjust/sdk/t;->ep:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
iget v1, v2, Landroid/util/DisplayMetrics;->densityDpi:I
if-nez v1, :cond_2
goto :goto_3
:cond_2
const/16 v3, 0x8c
if-ge v1, v3, :cond_3
const-string v5, "low"
goto :goto_3
:cond_3
const/16 v3, 0xc8
if-le v1, v3, :cond_4
const-string v5, "high"
goto :goto_3
:cond_4
const-string v5, "medium"
:goto_3
2019-03-26 19:13:28 +00:00
iput-object v5, p0, Lcom/adjust/sdk/t;->eq:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
iget v1, v2, Landroid/util/DisplayMetrics;->widthPixels:I
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v1
2019-03-26 19:13:28 +00:00
iput-object v1, p0, Lcom/adjust/sdk/t;->er:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
iget v1, v2, Landroid/util/DisplayMetrics;->heightPixels:I
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v1
2019-03-26 19:13:28 +00:00
iput-object v1, p0, Lcom/adjust/sdk/t;->es:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
if-nez p2, :cond_5
const-string p2, "android4.12.0"
goto :goto_4
:cond_5
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
const-string v2, "%s@%s"
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Object;
aput-object p2, v3, v0
const/4 p2, 0x1
const-string v4, "android4.12.0"
aput-object v4, v3, p2
invoke-static {v1, v2, v3}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
:goto_4
iput-object p2, p0, Lcom/adjust/sdk/t;->clientSdk:Ljava/lang/String;
invoke-static {p1}, Lcom/adjust/sdk/t;->c(Landroid/content/Context;)Ljava/lang/String;
move-result-object p2
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->eh:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-static {p1}, Lcom/adjust/sdk/az;->l(Landroid/content/Context;)Ljava/util/Map;
2019-02-04 20:08:30 +00:00
move-result-object p2
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->ez:Ljava/util/Map;
2019-02-04 20:08:30 +00:00
sget-object p2, Landroid/os/Build;->DISPLAY:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->et:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-static {}, Lcom/adjust/sdk/az;->getSupportedAbis()[Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p2
if-eqz p2, :cond_7
array-length v1, p2
if-nez v1, :cond_6
goto :goto_5
:cond_6
aget-object p2, p2, v0
goto :goto_6
:cond_7
:goto_5
2019-02-17 02:24:41 +00:00
invoke-static {}, Lcom/adjust/sdk/az;->ax()Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p2
:goto_6
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->eu:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
sget-object p2, Landroid/os/Build;->ID:Ljava/lang/String;
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->ev:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-static {}, Lcom/adjust/sdk/az;->aw()Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p2
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->ew:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Lcom/adjust/sdk/t;->d(Landroid/content/Context;)Ljava/lang/String;
move-result-object p2
2019-03-26 19:13:28 +00:00
iput-object p2, p0, Lcom/adjust/sdk/t;->ex:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Lcom/adjust/sdk/t;->e(Landroid/content/Context;)Ljava/lang/String;
move-result-object p1
2019-03-26 19:13:28 +00:00
iput-object p1, p0, Lcom/adjust/sdk/t;->ey:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
return-void
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_1
:pswitch_0
:pswitch_0
.end packed-switch
:pswitch_data_1
.packed-switch 0x1
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
.end packed-switch
.end method
.method private static b(Landroid/content/Context;)Ljava/lang/String;
.locals 2
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p0
const/4 v1, 0x0
invoke-virtual {v0, p0, v1}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object p0
iget-object p0, p0, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
const/4 p0, 0x0
return-object p0
.end method
.method private static c(Landroid/content/Context;)Ljava/lang/String;
.locals 7
const/4 v0, 0x0
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string p0, "content://com.facebook.katana.provider.AttributionIdProvider"
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v2
const/4 p0, 0x1
new-array v3, p0, [Ljava/lang/String;
const/4 p0, 0x0
const-string v4, "aid"
aput-object v4, v3, p0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
invoke-virtual/range {v1 .. v6}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
move-result-object p0
if-nez p0, :cond_0
return-object v0
:cond_0
invoke-interface {p0}, Landroid/database/Cursor;->moveToFirst()Z
move-result v1
if-nez v1, :cond_1
invoke-interface {p0}, Landroid/database/Cursor;->close()V
return-object v0
:cond_1
const-string v1, "aid"
invoke-interface {p0, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v1
invoke-interface {p0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-interface {p0}, Landroid/database/Cursor;->close()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object v1
:catch_0
return-object v0
.end method
.method private static d(Landroid/content/Context;)Ljava/lang/String;
.locals 4
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p0
const/16 v1, 0x1000
invoke-virtual {v0, p0, v1}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object p0
2019-03-26 19:13:28 +00:00
sget-object v0, Lcom/adjust/sdk/az;->fx:Ljava/text/SimpleDateFormat;
2019-02-04 20:08:30 +00:00
new-instance v1, Ljava/util/Date;
iget-wide v2, p0, Landroid/content/pm/PackageInfo;->firstInstallTime:J
invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V
invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)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/4 p0, 0x0
return-object p0
.end method
.method private static e(Landroid/content/Context;)Ljava/lang/String;
.locals 4
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p0
const/16 v1, 0x1000
invoke-virtual {v0, p0, v1}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object p0
2019-03-26 19:13:28 +00:00
sget-object v0, Lcom/adjust/sdk/az;->fx:Ljava/text/SimpleDateFormat;
2019-02-04 20:08:30 +00:00
new-instance v1, Ljava/util/Date;
iget-wide v2, p0, Landroid/content/pm/PackageInfo;->lastUpdateTime:J
invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V
invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)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/4 p0, 0x0
return-object p0
.end method
.method private static f(Ljava/lang/String;)Ljava/lang/String;
.locals 0
if-nez p0, :cond_0
const/4 p0, 0x0
return-object p0
:cond_0
2019-02-17 02:24:41 +00:00
invoke-static {p0}, Lcom/adjust/sdk/az;->n(Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p0
return-object p0
.end method
.method private static g(Ljava/lang/String;)Ljava/lang/String;
.locals 2
if-nez p0, :cond_0
const/4 p0, 0x0
return-object p0
:cond_0
const-string v0, ":"
const-string v1, ""
invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
2019-02-17 02:24:41 +00:00
invoke-static {p0}, Lcom/adjust/sdk/az;->p(Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p0
return-object p0
.end method
# virtual methods
.method final a(Landroid/content/Context;)V
.locals 3
2019-02-17 02:24:41 +00:00
invoke-static {p1}, Lcom/adjust/sdk/az;->h(Landroid/content/Context;)Ljava/lang/Boolean;
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-03-26 19:13:28 +00:00
iput-object v0, p0, Lcom/adjust/sdk/t;->ec:Ljava/lang/Boolean;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-static {p1}, Lcom/adjust/sdk/az;->g(Landroid/content/Context;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-03-26 19:13:28 +00:00
iput-object v0, p0, Lcom/adjust/sdk/t;->eb:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-03-26 19:13:28 +00:00
iget-object v0, p0, Lcom/adjust/sdk/t;->eb:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
if-nez v0, :cond_1
2019-03-26 19:13:28 +00:00
iget-boolean v0, p0, Lcom/adjust/sdk/t;->ed:Z
2019-02-04 20:08:30 +00:00
if-nez v0, :cond_1
const-string v0, "android.permission.ACCESS_WIFI_STATE"
2019-02-17 02:24:41 +00:00
invoke-static {p1, v0}, Lcom/adjust/sdk/az;->a(Landroid/content/Context;Ljava/lang/String;)Z
2019-02-04 20:08:30 +00:00
move-result v0
if-nez v0, :cond_0
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
move-result-object v0
const-string v1, "Missing permission: ACCESS_WIFI_STATE"
const/4 v2, 0x0
new-array v2, v2, [Ljava/lang/Object;
invoke-interface {v0, v1, v2}, Lcom/adjust/sdk/x;->d(Ljava/lang/String;[Ljava/lang/Object;)V
:cond_0
2019-02-17 02:24:41 +00:00
invoke-static {p1}, Lcom/adjust/sdk/az;->i(Landroid/content/Context;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object v0
invoke-static {v0}, Lcom/adjust/sdk/t;->f(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
2019-03-26 19:13:28 +00:00
iput-object v1, p0, Lcom/adjust/sdk/t;->ee:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
invoke-static {v0}, Lcom/adjust/sdk/t;->g(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
2019-03-26 19:13:28 +00:00
iput-object v0, p0, Lcom/adjust/sdk/t;->ef:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-static {p1}, Lcom/adjust/sdk/az;->j(Landroid/content/Context;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-03-26 19:13:28 +00:00
iput-object p1, p0, Lcom/adjust/sdk/t;->eg:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
const/4 p1, 0x1
2019-03-26 19:13:28 +00:00
iput-boolean p1, p0, Lcom/adjust/sdk/t;->ed:Z
2019-02-04 20:08:30 +00:00
:cond_1
return-void
.end method