477 lines
13 KiB
Smali
477 lines
13 KiB
Smali
.class final Lio/fabric/sdk/android/a/g/l;
|
|
.super Lio/fabric/sdk/android/a/b/a;
|
|
.source "DefaultSettingsSpiCall.java"
|
|
|
|
# interfaces
|
|
.implements Lio/fabric/sdk/android/a/g/x;
|
|
|
|
|
|
# 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;->baJ: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/g/l;-><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
|
|
|
|
.method private constructor <init>(Lio/fabric/sdk/android/i;Ljava/lang/String;Ljava/lang/String;Lio/fabric/sdk/android/a/e/e;I)V
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p5}, 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
|
|
|
|
.method private static a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p0, p1, p2}, Lio/fabric/sdk/android/a/e/d;->W(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private dp(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
.locals 5
|
|
|
|
:try_start_0
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Fabric"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "Failed to parse settings JSON from "
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v4, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v1, v2, v3, v0}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Fabric"
|
|
|
|
const-string v2, "Settings response "
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, v1, p1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lio/fabric/sdk/android/a/g/w;)Lorg/json/JSONObject;
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string v2, "build_version"
|
|
|
|
iget-object v3, p1, Lio/fabric/sdk/android/a/g/w;->bbz:Ljava/lang/String;
|
|
|
|
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const-string v2, "display_version"
|
|
|
|
iget-object v3, p1, Lio/fabric/sdk/android/a/g/w;->bby:Ljava/lang/String;
|
|
|
|
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const-string v2, "source"
|
|
|
|
iget v3, p1, Lio/fabric/sdk/android/a/g/w;->bbB:I
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, p1, Lio/fabric/sdk/android/a/g/w;->bcB:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const-string v2, "icon_hash"
|
|
|
|
iget-object v3, p1, Lio/fabric/sdk/android/a/g/w;->bcB:Ljava/lang/String;
|
|
|
|
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
iget-object v2, p1, Lio/fabric/sdk/android/a/g/w;->bcA:Ljava/lang/String;
|
|
|
|
invoke-static {v2}, Lio/fabric/sdk/android/a/b/i;->Q(Ljava/lang/String;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
const-string v3, "instance"
|
|
|
|
invoke-interface {v1, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v1}, Lio/fabric/sdk/android/a/g/l;->p(Ljava/util/Map;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v2
|
|
:try_end_0
|
|
.catch Lio/fabric/sdk/android/a/e/d$c; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:try_start_1
|
|
const-string v3, "X-CRASHLYTICS-API-KEY"
|
|
|
|
iget-object v4, p1, Lio/fabric/sdk/android/a/g/w;->oC:Ljava/lang/String;
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-API-CLIENT-TYPE"
|
|
|
|
const-string v4, "android"
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-API-CLIENT-VERSION"
|
|
|
|
iget-object v4, p0, Lio/fabric/sdk/android/a/g/l;->nC:Lio/fabric/sdk/android/i;
|
|
|
|
invoke-virtual {v4}, Lio/fabric/sdk/android/i;->getVersion()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "Accept"
|
|
|
|
const-string v4, "application/json"
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-DEVICE-MODEL"
|
|
|
|
iget-object v4, p1, Lio/fabric/sdk/android/a/g/w;->pe:Ljava/lang/String;
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-OS-BUILD-VERSION"
|
|
|
|
iget-object v4, p1, Lio/fabric/sdk/android/a/g/w;->bcy:Ljava/lang/String;
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-OS-DISPLAY-VERSION"
|
|
|
|
iget-object v4, p1, Lio/fabric/sdk/android/a/g/w;->bcz:Ljava/lang/String;
|
|
|
|
invoke-static {v2, v3, v4}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-CRASHLYTICS-INSTALLATION-ID"
|
|
|
|
iget-object p1, p1, Lio/fabric/sdk/android/a/g/w;->pa:Ljava/lang/String;
|
|
|
|
invoke-static {v2, v3, p1}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v3, "Fabric"
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
const-string v5, "Requesting settings from "
|
|
|
|
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v5, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {p1, v3, v4}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v3, "Fabric"
|
|
|
|
const-string v4, "Settings query params were: "
|
|
|
|
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v4, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1, v3, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Lio/fabric/sdk/android/a/e/d;->xA()I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "Fabric"
|
|
|
|
const-string v4, "Settings result was: "
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v1, v3, v4}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/16 v1, 0xc8
|
|
|
|
if-eq p1, v1, :cond_3
|
|
|
|
const/16 v1, 0xc9
|
|
|
|
if-eq p1, v1, :cond_3
|
|
|
|
const/16 v1, 0xca
|
|
|
|
if-eq p1, v1, :cond_3
|
|
|
|
const/16 v1, 0xcb
|
|
|
|
if-ne p1, v1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {v2}, Lio/fabric/sdk/android/a/e/d;->xB()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lio/fabric/sdk/android/a/g/l;->dp(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v0, p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "Fabric"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "Failed to retrieve settings from "
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v4, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {p1, v1, v3}, Lio/fabric/sdk/android/l;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_1
|
|
.catch Lio/fabric/sdk/android/a/e/d$c; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
:goto_2
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "Fabric"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "Settings request ID: "
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
:goto_3
|
|
const-string v4, "X-REQUEST-ID"
|
|
|
|
invoke-virtual {v2, v4}, Lio/fabric/sdk/android/a/e/d;->dl(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p1, v1, v2}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_5
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
goto :goto_4
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
move-object v2, v0
|
|
|
|
goto :goto_6
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
move-object v2, v0
|
|
|
|
:goto_4
|
|
:try_start_2
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "Fabric"
|
|
|
|
const-string v4, "Settings request failed."
|
|
|
|
invoke-interface {v1, v3, v4, p1}, Lio/fabric/sdk/android/l;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "Fabric"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "Settings request ID: "
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
:goto_5
|
|
return-object v0
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
:goto_6
|
|
if-eqz v2, :cond_6
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wA()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Settings request ID: "
|
|
|
|
invoke-direct {v1, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v3, "X-REQUEST-ID"
|
|
|
|
invoke-virtual {v2, v3}, Lio/fabric/sdk/android/a/e/d;->dl(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
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
|
|
|
|
const-string v2, "Fabric"
|
|
|
|
invoke-interface {v0, v2, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_6
|
|
throw p1
|
|
|
|
return-void
|
|
.end method
|