apkfuckery/com.discord/smali/f/c/a/n.smali

235 lines
4.8 KiB
Smali
Raw Permalink Normal View History

2020-11-12 02:11:44 +00:00
.class public Lf/c/a/n;
.super Ljava/lang/Object;
2020-11-21 22:11:07 +00:00
.source "AdjustConfig.java"
2020-11-13 19:18:44 +00:00
2020-11-14 03:19:56 +00:00
2020-11-21 21:10:53 +00:00
# instance fields
2020-11-21 22:11:07 +00:00
.field public a:Landroid/content/Context;
2020-11-14 03:19:56 +00:00
2020-11-21 22:11:07 +00:00
.field public b:Ljava/lang/String;
2020-11-14 03:19:56 +00:00
2020-11-21 22:11:07 +00:00
.field public c:Ljava/lang/String;
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
.field public d:Ljava/lang/String;
.field public e:Lf/c/a/s0;
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
.field public f:Lf/c/a/j0;
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
.locals 3
2020-11-16 22:05:17 +00:00
2020-11-21 21:10:53 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
invoke-static {}, Lf/c/a/p;->a()Lf/c/a/j0;
move-result-object v0
iput-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
sget-object v1, Lf/c/a/q0;->f:Lf/c/a/q0;
const-string v2, "production"
invoke-virtual {v2, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
invoke-interface {v0, v1, v2}, Lf/c/a/j0;->b(Lf/c/a/q0;Z)V
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object p1
iput-object p1, p0, Lf/c/a/n;->a:Landroid/content/Context;
iput-object p2, p0, Lf/c/a/n;->b:Ljava/lang/String;
iput-object p3, p0, Lf/c/a/n;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
return-void
.end method
# virtual methods
2020-11-21 22:11:07 +00:00
.method public a()Z
2020-11-12 02:11:44 +00:00
.locals 5
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->b:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/4 v1, 0x1
const/4 v2, 0x0
2020-11-12 02:11:44 +00:00
if-nez v0, :cond_0
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
new-array v3, v2, [Ljava/lang/Object;
const-string v4, "Missing App Token"
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
:goto_0
const/4 v0, 0x0
goto :goto_1
2020-11-12 02:11:44 +00:00
:cond_0
2020-11-21 22:11:07 +00:00
invoke-virtual {v0}, Ljava/lang/String;->length()I
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result v3
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/16 v4, 0xc
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-eq v3, v4, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
iget-object v3, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
new-array v4, v1, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
aput-object v0, v4, v2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-string v0, "Malformed App Token \'%s\'"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v3, v0, v4}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
goto :goto_0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:cond_1
const/4 v0, 0x1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:goto_1
if-nez v0, :cond_2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
return v2
2020-11-13 19:18:44 +00:00
2020-11-21 22:11:07 +00:00
:cond_2
iget-object v0, p0, Lf/c/a/n;->c:Ljava/lang/String;
2020-11-13 19:18:44 +00:00
2020-11-21 22:11:07 +00:00
if-nez v0, :cond_3
2020-11-14 03:19:56 +00:00
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-14 03:19:56 +00:00
2020-11-21 22:11:07 +00:00
new-array v3, v2, [Ljava/lang/Object;
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
const-string v4, "Missing environment"
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
:goto_2
const/4 v0, 0x0
goto :goto_4
2020-11-12 02:11:44 +00:00
:cond_3
2020-11-21 22:11:07 +00:00
const-string v3, "sandbox"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result v3
2020-11-12 02:11:44 +00:00
if-eqz v3, :cond_4
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
new-array v3, v2, [Ljava/lang/Object;
const-string v4, "SANDBOX: Adjust is running in Sandbox mode. Use this setting for testing. Don\'t forget to set the environment to `production` before publishing!"
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->c(Ljava/lang/String;[Ljava/lang/Object;)V
:goto_3
const/4 v0, 0x1
goto :goto_4
2020-11-12 02:11:44 +00:00
:cond_4
2020-11-21 22:11:07 +00:00
const-string v3, "production"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result v3
2020-11-12 02:11:44 +00:00
if-eqz v3, :cond_5
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
new-array v3, v2, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-string v4, "PRODUCTION: Adjust is running in Production mode. Use this setting only for the build that you want to publish. Set the environment to `sandbox` if you want to test your app!"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->c(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
goto :goto_3
2020-11-21 22:11:07 +00:00
:cond_5
iget-object v3, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
new-array v4, v1, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
aput-object v0, v4, v2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-string v0, "Unknown environment \'%s\'"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v3, v0, v4}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
goto :goto_2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:goto_4
if-nez v0, :cond_6
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
return v2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:cond_6
iget-object v0, p0, Lf/c/a/n;->a:Landroid/content/Context;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-nez v0, :cond_7
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
new-array v3, v2, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-string v4, "Missing context"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:goto_5
const/4 v0, 0x0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
goto :goto_6
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:cond_7
const-string v3, "android.permission.INTERNET"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-static {v0, v3}, Lf/c/a/l1;->a(Landroid/content/Context;Ljava/lang/String;)Z
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result v0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-nez v0, :cond_8
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
iget-object v0, p0, Lf/c/a/n;->f:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
new-array v3, v2, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-string v4, "Missing permission: INTERNET"
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-interface {v0, v4, v3}, Lf/c/a/j0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
goto :goto_5
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
:cond_8
const/4 v0, 0x1
2020-11-12 02:11:44 +00:00
:goto_6
2020-11-21 22:11:07 +00:00
if-nez v0, :cond_9
2020-11-16 22:05:17 +00:00
2020-11-21 22:11:07 +00:00
return v2
:cond_9
return v1
2020-11-12 02:11:44 +00:00
.end method