apkfuckery/com.discord/smali/com/adjust/sdk/az.smali
2019-02-17 01:24:05 +01:00

1210 lines
30 KiB
Smali

.class public final Lcom/adjust/sdk/az;
.super Ljava/lang/Object;
.source "UtilNetworking.java"
# static fields
.field static dp:Ljava/lang/String;
# direct methods
.method private static a(Ljava/lang/String;Ljava/util/Map;)Landroid/net/Uri;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)",
"Landroid/net/Uri;"
}
.end annotation
new-instance v0, Landroid/net/Uri$Builder;
invoke-direct {v0}, Landroid/net/Uri$Builder;-><init>()V
const-string v1, "https"
invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->scheme(Ljava/lang/String;)Landroid/net/Uri$Builder;
const-string v1, "app.adjust.com"
invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->authority(Ljava/lang/String;)Landroid/net/Uri$Builder;
invoke-virtual {v0, p0}, Landroid/net/Uri$Builder;->appendPath(Ljava/lang/String;)Landroid/net/Uri$Builder;
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p0
invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result p1
if-eqz p1, :cond_0
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/Map$Entry;
invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
invoke-virtual {v0, v1, p1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
goto :goto_0
:cond_0
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide p0
sget-object v1, Lcom/adjust/sdk/ay;->fC:Ljava/text/SimpleDateFormat;
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
invoke-virtual {v1, p0}, Ljava/text/SimpleDateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
const-string p1, "sent_at"
invoke-virtual {v0, p1, p0}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
invoke-virtual {v0}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;
move-result-object p0
return-object p0
.end method
.method public static a(Ljava/lang/String;Lcom/adjust/sdk/c;I)Lcom/adjust/sdk/aq;
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
const/4 v0, 0x0
:try_start_0
new-instance v1, Ljava/net/URL;
invoke-direct {v1, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-static {v1}, Lcom/adjust/sdk/j;->a(Ljava/net/URL;)Ljavax/net/ssl/HttpsURLConnection;
move-result-object p0
new-instance v1, Ljava/util/HashMap;
iget-object v2, p1, Lcom/adjust/sdk/c;->parameters:Ljava/util/Map;
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
invoke-static {v1}, Lcom/adjust/sdk/az;->i(Ljava/util/Map;)Ljava/lang/String;
move-result-object v2
invoke-static {v1}, Lcom/adjust/sdk/az;->j(Ljava/util/Map;)Ljava/lang/String;
move-result-object v3
iget-object v4, p1, Lcom/adjust/sdk/c;->clientSdk:Ljava/lang/String;
invoke-static {p0, v4}, Lcom/adjust/sdk/az;->a(Ljavax/net/ssl/HttpsURLConnection;Ljava/lang/String;)V
iget-object v4, p1, Lcom/adjust/sdk/c;->activityKind:Lcom/adjust/sdk/b;
invoke-virtual {v4}, Lcom/adjust/sdk/b;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v1, v2, v3, v4}, Lcom/adjust/sdk/az;->a(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
const-string v3, "Authorization"
invoke-virtual {p0, v3, v2}, Ljavax/net/ssl/HttpsURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
const-string v2, "POST"
invoke-virtual {p0, v2}, Ljavax/net/ssl/HttpsURLConnection;->setRequestMethod(Ljava/lang/String;)V
const/4 v2, 0x0
invoke-virtual {p0, v2}, Ljavax/net/ssl/HttpsURLConnection;->setUseCaches(Z)V
const/4 v2, 0x1
invoke-virtual {p0, v2}, Ljavax/net/ssl/HttpsURLConnection;->setDoInput(Z)V
invoke-virtual {p0, v2}, Ljavax/net/ssl/HttpsURLConnection;->setDoOutput(Z)V
new-instance v2, Ljava/io/DataOutputStream;
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->getOutputStream()Ljava/io/OutputStream;
move-result-object v3
invoke-direct {v2, v3}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
invoke-static {v1, p2}, Lcom/adjust/sdk/az;->a(Ljava/util/Map;I)Ljava/lang/String;
move-result-object p2
invoke-virtual {v2, p2}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V
invoke-static {p0, p1}, Lcom/adjust/sdk/az;->a(Ljavax/net/ssl/HttpsURLConnection;Lcom/adjust/sdk/c;)Lcom/adjust/sdk/aq;
move-result-object p0
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
invoke-virtual {v2}, Ljava/io/DataOutputStream;->flush()V
invoke-virtual {v2}, Ljava/io/DataOutputStream;->close()V
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
:catch_0
return-object p0
:catchall_0
move-exception p0
move-object v0, v2
goto :goto_1
:catch_1
move-exception p0
move-object v0, v2
goto :goto_0
:catchall_1
move-exception p0
goto :goto_1
:catch_2
move-exception p0
:goto_0
:try_start_3
throw p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:goto_1
if-eqz v0, :cond_1
:try_start_4
invoke-virtual {v0}, Ljava/io/DataOutputStream;->flush()V
invoke-virtual {v0}, Ljava/io/DataOutputStream;->close()V
:try_end_4
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3
:catch_3
:cond_1
throw p0
.end method
.method private static a(Ljavax/net/ssl/HttpsURLConnection;Lcom/adjust/sdk/c;)Lcom/adjust/sdk/aq;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
new-instance v0, Ljava/lang/StringBuffer;
invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
move-result-object v1
invoke-static {p1}, Lcom/adjust/sdk/aq;->c(Lcom/adjust/sdk/c;)Lcom/adjust/sdk/aq;
move-result-object p1
const/4 v2, 0x0
const/4 v3, 0x1
:try_start_0
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->connect()V
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->getResponseCode()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
move-result v5
const/16 v6, 0x190
if-lt v5, v6, :cond_0
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->getErrorStream()Ljava/io/InputStream;
move-result-object v5
goto :goto_0
:cond_0
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v5
:goto_0
new-instance v6, Ljava/io/InputStreamReader;
invoke-direct {v6, v5}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
new-instance v5, Ljava/io/BufferedReader;
invoke-direct {v5, v6}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
:goto_1
invoke-virtual {v5}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v6
if-eqz v6, :cond_1
invoke-virtual {v0, v6}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_1
:cond_1
if-eqz p0, :cond_2
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->disconnect()V
:cond_2
invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object p0
const-string v0, "Response: %s"
new-array v5, v3, [Ljava/lang/Object;
aput-object p0, v5, v2
invoke-interface {v1, v0, v5}, Lcom/adjust/sdk/x;->a(Ljava/lang/String;[Ljava/lang/Object;)V
if-eqz p0, :cond_7
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
if-nez v0, :cond_3
goto :goto_4
:cond_3
const/4 v0, 0x0
:try_start_1
new-instance v5, Lorg/json/JSONObject;
invoke-direct {v5, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
:try_end_1
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_2
:catch_0
move-exception p0
const-string v5, "Failed to parse json response. (%s)"
new-array v6, v3, [Ljava/lang/Object;
invoke-virtual {p0}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v6, v2
invoke-static {v5, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
new-array v5, v2, [Ljava/lang/Object;
invoke-interface {v1, p0, v5}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
iput-object p0, p1, Lcom/adjust/sdk/aq;->message:Ljava/lang/String;
move-object v5, v0
:goto_2
if-nez v5, :cond_4
return-object p1
:cond_4
iput-object v5, p1, Lcom/adjust/sdk/aq;->dA:Lorg/json/JSONObject;
const-string p0, "message"
invoke-virtual {v5, p0, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
iput-object p0, p1, Lcom/adjust/sdk/aq;->message:Ljava/lang/String;
const-string v6, "timestamp"
invoke-virtual {v5, v6, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
iput-object v6, p1, Lcom/adjust/sdk/aq;->timestamp:Ljava/lang/String;
const-string v6, "adid"
invoke-virtual {v5, v6, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
iput-object v0, p1, Lcom/adjust/sdk/aq;->adid:Ljava/lang/String;
if-nez p0, :cond_5
const-string p0, "No message found"
:cond_5
if-eqz v4, :cond_6
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
move-result v0
const/16 v4, 0xc8
if-ne v0, v4, :cond_6
const-string v0, "%s"
new-array v4, v3, [Ljava/lang/Object;
aput-object p0, v4, v2
invoke-interface {v1, v0, v4}, Lcom/adjust/sdk/x;->c(Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean v3, p1, Lcom/adjust/sdk/aq;->fp:Z
goto :goto_3
:cond_6
const-string v0, "%s"
new-array v3, v3, [Ljava/lang/Object;
aput-object p0, v3, v2
invoke-interface {v1, v0, v3}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
:goto_3
return-object p1
:cond_7
:goto_4
return-object p1
:catchall_0
move-exception p1
goto :goto_5
:catch_1
move-exception p1
:try_start_2
const-string v0, "Failed to read response. (%s)"
new-array v3, v3, [Ljava/lang/Object;
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v4
aput-object v4, v3, v2
invoke-interface {v1, v0, v3}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
throw p1
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:goto_5
if-eqz p0, :cond_8
invoke-virtual {p0}, Ljavax/net/ssl/HttpsURLConnection;->disconnect()V
:cond_8
throw p1
return-void
.end method
.method private static a(Ljava/util/Map;I)Ljava/lang/String;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;I)",
"Ljava/lang/String;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/UnsupportedEncodingException;
}
.end annotation
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-interface {p0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p0
invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_2
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
const-string v3, "UTF-8"
invoke-static {v2, v3}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
if-eqz v1, :cond_0
const-string v3, "UTF-8"
invoke-static {v1, v3}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
goto :goto_1
:cond_0
const-string v1, ""
:goto_1
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
move-result v3
if-lez v3, :cond_1
const-string v3, "&"
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:cond_1
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, "="
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_0
:cond_2
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
sget-object p0, Lcom/adjust/sdk/ay;->fC:Ljava/text/SimpleDateFormat;
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v1
invoke-virtual {p0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
const-string v1, "&"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "sent_at"
const-string v2, "UTF-8"
invoke-static {v1, v2}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "UTF-8"
invoke-static {p0, v1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
if-lez p1, :cond_3
const-string p0, "&"
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, "queue_size"
const-string v1, "UTF-8"
invoke-static {p0, v1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, "="
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p0
const-string p1, "UTF-8"
invoke-static {p0, p1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:cond_3
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method private static a(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;",
"Ljava/lang/String;",
"Ljava/lang/String;",
"Ljava/lang/String;",
")",
"Ljava/lang/String;"
}
.end annotation
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-nez v0, :cond_0
goto :goto_0
:cond_0
invoke-static {p0, p3, p1}, Lcom/adjust/sdk/az;->b(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
move-result-object p0
const-string p1, "sha256"
const-string p3, "clear_signature"
invoke-interface {p0, p3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
check-cast p3, Ljava/lang/String;
invoke-static {p3}, Lcom/adjust/sdk/ay;->o(Ljava/lang/String;)Ljava/lang/String;
move-result-object p3
const-string v0, "fields"
invoke-interface {p0, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/String;
const-string v0, "secret_id=\"%s\""
const/4 v1, 0x1
new-array v2, v1, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p2, v2, v3
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
const-string v0, "signature=\"%s\""
new-array v2, v1, [Ljava/lang/Object;
aput-object p3, v2, v3
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
const-string v0, "algorithm=\"%s\""
new-array v2, v1, [Ljava/lang/Object;
aput-object p1, v2, v3
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string v0, "headers=\"%s\""
new-array v2, v1, [Ljava/lang/Object;
aput-object p0, v2, v3
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
const-string v0, "Signature %s,%s,%s,%s"
const/4 v2, 0x4
new-array v2, v2, [Ljava/lang/Object;
aput-object p2, v2, v3
aput-object p3, v2, v1
const/4 p2, 0x2
aput-object p1, v2, p2
const/4 p1, 0x3
aput-object p0, v2, p1
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
move-result-object p1
const-string p2, "authorizationHeader: %s"
new-array p3, v1, [Ljava/lang/Object;
aput-object p0, p3, v3
invoke-interface {p1, p2, p3}, Lcom/adjust/sdk/x;->a(Ljava/lang/String;[Ljava/lang/Object;)V
return-object p0
:cond_1
:goto_0
const/4 p0, 0x0
return-object p0
.end method
.method private static a(Ljavax/net/ssl/HttpsURLConnection;Ljava/lang/String;)V
.locals 1
const-string v0, "Client-SDK"
invoke-virtual {p0, v0, p1}, Ljavax/net/ssl/HttpsURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
const p1, 0xea60
invoke-virtual {p0, p1}, Ljavax/net/ssl/HttpsURLConnection;->setConnectTimeout(I)V
invoke-virtual {p0, p1}, Ljavax/net/ssl/HttpsURLConnection;->setReadTimeout(I)V
sget-object p1, Lcom/adjust/sdk/az;->dp:Ljava/lang/String;
if-eqz p1, :cond_0
const-string v0, "User-Agent"
invoke-virtual {p0, v0, p1}, Ljavax/net/ssl/HttpsURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
return-void
.end method
.method private static b(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;",
"Ljava/lang/String;",
"Ljava/lang/String;",
")",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
const-string v0, "activity_kind"
const-string v1, "created_at"
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
invoke-static {p0}, Lcom/adjust/sdk/az;->k(Ljava/util/Map;)Ljava/lang/String;
move-result-object v3
invoke-interface {p0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/String;
new-instance v4, Ljava/util/HashMap;
invoke-direct {v4}, Ljava/util/HashMap;-><init>()V
const-string v5, "app_secret"
invoke-interface {v4, v5, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-interface {v4, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-interface {v4, v0, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-interface {v4, v3, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string p0, ""
const-string p1, ""
invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p2
invoke-interface {p2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p2
:cond_0
:goto_0
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
if-eqz v1, :cond_0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/String;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " "
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
goto :goto_0
:cond_1
const/4 p2, 0x0
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
invoke-virtual {p0, p2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object p0
new-instance p2, Ljava/util/HashMap;
invoke-direct {p2}, Ljava/util/HashMap;-><init>()V
const-string v0, "clear_signature"
invoke-virtual {p2, v0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string p1, "fields"
invoke-virtual {p2, p1, p0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-object p2
.end method
.method public static e(Lcom/adjust/sdk/c;)Lcom/adjust/sdk/aq;
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
:try_start_0
new-instance v0, Ljava/util/HashMap;
iget-object v1, p0, Lcom/adjust/sdk/c;->parameters:Ljava/util/Map;
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
invoke-static {v0}, Lcom/adjust/sdk/az;->i(Ljava/util/Map;)Ljava/lang/String;
move-result-object v1
invoke-static {v0}, Lcom/adjust/sdk/az;->j(Ljava/util/Map;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lcom/adjust/sdk/c;->path:Ljava/lang/String;
invoke-static {v3, v0}, Lcom/adjust/sdk/az;->a(Ljava/lang/String;Ljava/util/Map;)Landroid/net/Uri;
move-result-object v3
new-instance v4, Ljava/net/URL;
invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;
move-result-object v3
invoke-direct {v4, v3}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-static {v4}, Lcom/adjust/sdk/j;->a(Ljava/net/URL;)Ljavax/net/ssl/HttpsURLConnection;
move-result-object v3
iget-object v4, p0, Lcom/adjust/sdk/c;->activityKind:Lcom/adjust/sdk/b;
invoke-virtual {v4}, Lcom/adjust/sdk/b;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v0, v1, v2, v4}, Lcom/adjust/sdk/az;->a(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
const-string v1, "Authorization"
invoke-virtual {v3, v1, v0}, Ljavax/net/ssl/HttpsURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
iget-object v0, p0, Lcom/adjust/sdk/c;->clientSdk:Ljava/lang/String;
invoke-static {v3, v0}, Lcom/adjust/sdk/az;->a(Ljavax/net/ssl/HttpsURLConnection;Ljava/lang/String;)V
const-string v0, "GET"
invoke-virtual {v3, v0}, Ljavax/net/ssl/HttpsURLConnection;->setRequestMethod(Ljava/lang/String;)V
invoke-static {v3, p0}, Lcom/adjust/sdk/az;->a(Ljavax/net/ssl/HttpsURLConnection;Lcom/adjust/sdk/c;)Lcom/adjust/sdk/aq;
move-result-object p0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
throw p0
.end method
.method private static i(Ljava/util/Map;)Ljava/lang/String;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)",
"Ljava/lang/String;"
}
.end annotation
const-string v0, "app_secret"
invoke-interface {p0, v0}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/String;
return-object p0
.end method
.method private static j(Ljava/util/Map;)Ljava/lang/String;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)",
"Ljava/lang/String;"
}
.end annotation
const-string v0, "secret_id"
invoke-interface {p0, v0}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/String;
return-object p0
.end method
.method private static k(Ljava/util/Map;)Ljava/lang/String;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)",
"Ljava/lang/String;"
}
.end annotation
const-string v0, "gps_adid"
const-string v1, "fire_adid"
const-string v2, "android_id"
const-string v3, "mac_sha1"
const-string v4, "mac_md5"
const-string v5, "android_uuid"
invoke-interface {p0, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
if-eqz v6, :cond_0
return-object v0
:cond_0
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_1
return-object v1
:cond_1
invoke-interface {p0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_2
return-object v2
:cond_2
invoke-interface {p0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_3
return-object v3
:cond_3
invoke-interface {p0, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_4
return-object v4
:cond_4
invoke-interface {p0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
if-eqz p0, :cond_5
return-object v5
:cond_5
const/4 p0, 0x0
return-object p0
.end method