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

269 lines
6.2 KiB
Smali
Raw Normal View History

2020-11-16 22:05:17 +00:00
.class public Lf/c/a/o0;
.super Ljava/lang/Object;
.source "InstallReferrerHuawei.java"
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
# instance fields
.field public a:Lf/c/a/j0;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
.field public b:Landroid/content/Context;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
.field public final c:Lf/c/a/p0;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
.field public final d:Ljava/util/concurrent/atomic/AtomicBoolean;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
# direct methods
.method public constructor <init>(Landroid/content/Context;Lf/c/a/p0;)V
.locals 1
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
invoke-static {}, Lf/c/a/p;->a()Lf/c/a/j0;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v0
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
iput-object v0, p0, Lf/c/a/o0;->a:Lf/c/a/j0;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
iput-object p1, p0, Lf/c/a/o0;->b:Landroid/content/Context;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
iput-object p2, p0, Lf/c/a/o0;->c:Lf/c/a/p0;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
const/4 p2, 0x1
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
invoke-direct {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object p1, p0, Lf/c/a/o0;->d:Ljava/util/concurrent/atomic/AtomicBoolean;
return-void
.end method
# virtual methods
.method public a()V
.locals 12
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
iget-object v0, p0, Lf/c/a/o0;->d:Ljava/util/concurrent/atomic/AtomicBoolean;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
iget-object v0, p0, Lf/c/a/o0;->a:Lf/c/a/j0;
new-array v1, v1, [Ljava/lang/Object;
const-string v2, "Should not try to read Install referrer Huawei"
invoke-interface {v0, v2, v1}, Lf/c/a/j0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
:cond_0
iget-object v0, p0, Lf/c/a/o0;->b:Landroid/content/Context;
const-string v2, "com.huawei.appmarket.commondata"
sget-object v3, Lf/c/a/l1;->a:Ljava/text/DecimalFormat;
2020-11-12 02:11:44 +00:00
const/4 v3, 0x1
2020-11-16 22:05:17 +00:00
:try_start_0
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v0, v2, v1}, Landroid/content/pm/PackageManager;->resolveContentProvider(Ljava/lang/String;I)Landroid/content/pm/ProviderInfo;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
if-eqz v0, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v0, 0x1
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
goto :goto_0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
:catch_0
:cond_1
const/4 v0, 0x0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
:goto_0
if-nez v0, :cond_2
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
return-void
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
:cond_2
const/4 v0, 0x0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const-string v2, "content://com.huawei.appmarket.commondata/item/5"
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v2
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
iget-object v4, p0, Lf/c/a/o0;->b:Landroid/content/Context;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v4
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
new-array v8, v3, [Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
iget-object v5, p0, Lf/c/a/o0;->b:Landroid/content/Context;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v5}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v5
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
aput-object v5, v8, v1
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v6, 0x0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v7, 0x0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v9, 0x0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-object v5, v2
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
:try_start_1
invoke-virtual/range {v4 .. v9}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v0
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v4, 0x2
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
if-eqz v0, :cond_3
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result v5
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
if-eqz v5, :cond_3
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v7
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v0, v3}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v2
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v5
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
iget-object v6, p0, Lf/c/a/o0;->a:Lf/c/a/j0;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const-string v8, "InstallReferrerHuawei reads referrer[%s] clickTime[%s] installTime[%s]"
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
const/4 v9, 0x3
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
new-array v9, v9, [Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
aput-object v7, v9, v1
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
aput-object v2, v9, v3
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
aput-object v5, v9, v4
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v6, v8, v9}, Lf/c/a/j0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-wide v8
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-static {v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-wide v10
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
iget-object v6, p0, Lf/c/a/o0;->c:Lf/c/a/p0;
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface/range {v6 .. v11}, Lf/c/a/p0;->a(Ljava/lang/String;JJ)V
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
goto :goto_1
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
:cond_3
iget-object v5, p0, Lf/c/a/o0;->a:Lf/c/a/j0;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
const-string v6, "InstallReferrerHuawei fail to read referrer for package [%s] and content uri [%s]"
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
new-array v4, v4, [Ljava/lang/Object;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
iget-object v7, p0, Lf/c/a/o0;->b:Landroid/content/Context;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v7}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v7
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
aput-object v7, v4, v1
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-virtual {v2}, Landroid/net/Uri;->toString()Ljava/lang/String;
2020-11-13 19:18:44 +00:00
2020-11-16 22:05:17 +00:00
move-result-object v2
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
aput-object v2, v4, v3
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v5, v6, v4}, Lf/c/a/j0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
:goto_1
if-eqz v0, :cond_4
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
goto :goto_2
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
:catchall_0
move-exception v1
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
goto :goto_3
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
:catch_1
move-exception v2
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
:try_start_2
iget-object v4, p0, Lf/c/a/o0;->a:Lf/c/a/j0;
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
const-string v5, "InstallReferrerHuawei error [%s]"
2020-11-14 03:19:56 +00:00
2020-11-16 22:05:17 +00:00
new-array v3, v3, [Ljava/lang/Object;
invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v2
aput-object v2, v3, v1
invoke-interface {v4, v5, v3}, Lf/c/a/j0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
if-eqz v0, :cond_4
:goto_2
invoke-interface {v0}, Landroid/database/Cursor;->close()V
:cond_4
iget-object v0, p0, Lf/c/a/o0;->d:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
return-void
:goto_3
if-eqz v0, :cond_5
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
invoke-interface {v0}, Landroid/database/Cursor;->close()V
2020-11-12 02:11:44 +00:00
2020-11-16 22:05:17 +00:00
:cond_5
throw v1
2020-11-12 02:11:44 +00:00
.end method