340 lines
9.5 KiB
Smali
340 lines
9.5 KiB
Smali
.class final Lcom/crashlytics/android/core/x;
|
|
.super Lio/fabric/sdk/android/a/b/a;
|
|
.source "DefaultCreateReportSpiCall.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/crashlytics/android/core/v;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lio/fabric/sdk/android/i;Ljava/lang/String;Ljava/lang/String;Lio/fabric/sdk/android/a/e/e;)V
|
|
.locals 6
|
|
|
|
sget v5, Lio/fabric/sdk/android/a/e/c;->bdv:I
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move-object v4, p4
|
|
|
|
invoke-direct/range {v0 .. v5}, Lio/fabric/sdk/android/a/b/a;-><init>(Lio/fabric/sdk/android/i;Ljava/lang/String;Ljava/lang/String;Lio/fabric/sdk/android/a/e/e;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/crashlytics/android/core/u;)Z
|
|
.locals 14
|
|
|
|
invoke-virtual {p0}, Lcom/crashlytics/android/core/x;->AC()Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p1, Lcom/crashlytics/android/core/u;->qs:Ljava/lang/String;
|
|
|
|
const-string v2, "X-CRASHLYTICS-API-KEY"
|
|
|
|
invoke-virtual {v0, v2, v1}, Lio/fabric/sdk/android/a/e/d;->X(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "X-CRASHLYTICS-API-CLIENT-TYPE"
|
|
|
|
const-string v2, "android"
|
|
|
|
invoke-virtual {v0, v1, v2}, Lio/fabric/sdk/android/a/e/d;->X(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/x;->pu:Lio/fabric/sdk/android/i;
|
|
|
|
invoke-virtual {v1}, Lio/fabric/sdk/android/i;->getVersion()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "X-CRASHLYTICS-API-CLIENT-VERSION"
|
|
|
|
invoke-virtual {v0, v2, v1}, Lio/fabric/sdk/android/a/e/d;->X(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p1, Lcom/crashlytics/android/core/u;->sD:Lcom/crashlytics/android/core/aq;
|
|
|
|
invoke-interface {v1}, Lcom/crashlytics/android/core/aq;->cS()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v3, v2}, Lio/fabric/sdk/android/a/e/d;->X(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p1, p1, Lcom/crashlytics/android/core/u;->sD:Lcom/crashlytics/android/core/aq;
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getIdentifier()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-string v3, "report[identifier]"
|
|
|
|
invoke-virtual {v0, v3, v2, v1}, Lio/fabric/sdk/android/a/e/d;->j(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->cR()[Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
array-length v1, v1
|
|
|
|
const-string v2, "application/octet-stream"
|
|
|
|
const-string v3, " to report "
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
const-string v6, "CrashlyticsCore"
|
|
|
|
if-ne v1, v5, :cond_1
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Aq()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
const-string v8, "Adding single file "
|
|
|
|
invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getFileName()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getIdentifier()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v1, v6, v3}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getFileName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getFile()Ljava/io/File;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v3, "report[file]"
|
|
|
|
invoke-virtual {v0, v3, v1, v2, p1}, Lio/fabric/sdk/android/a/e/d;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->cR()[Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
array-length v7, v1
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
:goto_1
|
|
if-ge v8, v7, :cond_2
|
|
|
|
aget-object v10, v1, v8
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Aq()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v11
|
|
|
|
new-instance v12, Ljava/lang/StringBuilder;
|
|
|
|
const-string v13, "Adding file "
|
|
|
|
invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v10}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-interface {p1}, Lcom/crashlytics/android/core/aq;->getIdentifier()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-interface {v11, v6, v12}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
new-instance v11, Ljava/lang/StringBuilder;
|
|
|
|
const-string v12, "report[file"
|
|
|
|
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v12, "]"
|
|
|
|
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-virtual {v10}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-virtual {v0, v11, v12, v2, v10}, Lio/fabric/sdk/android/a/e/d;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
add-int/2addr v9, v5
|
|
|
|
add-int/lit8 v8, v8, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_2
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Aq()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Sending report to: "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1, v6, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lio/fabric/sdk/android/a/e/d;->Bo()I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Aq()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Create report request ID: "
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-REQUEST-ID"
|
|
|
|
invoke-virtual {v0, v3}, Lio/fabric/sdk/android/a/e/d;->dj(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v1, v6, v0}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Aq()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Result was: "
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v6, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lio/fabric/sdk/android/a/b/v;->cT(I)I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
return v5
|
|
|
|
:cond_3
|
|
return v4
|
|
.end method
|