459 lines
13 KiB
Smali
459 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;->bkA: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;->ac(Ljava/lang/String;Ljava/lang/String;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private dM(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
.locals 4
|
|
|
|
: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;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Failed to parse settings JSON from "
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v3, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Fabric"
|
|
|
|
invoke-interface {v1, v3, v2, v0}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "Settings response "
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, v3, 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 8
|
|
|
|
const-string v0, "X-REQUEST-ID"
|
|
|
|
const-string v1, "Settings request ID: "
|
|
|
|
const-string v2, "Fabric"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:try_start_0
|
|
new-instance v4, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v4}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string v5, "build_version"
|
|
|
|
iget-object v6, p1, Lio/fabric/sdk/android/a/g/w;->blq:Ljava/lang/String;
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const-string v5, "display_version"
|
|
|
|
iget-object v6, p1, Lio/fabric/sdk/android/a/g/w;->blp:Ljava/lang/String;
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const-string v5, "source"
|
|
|
|
iget v6, p1, Lio/fabric/sdk/android/a/g/w;->bls:I
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v5, p1, Lio/fabric/sdk/android/a/g/w;->bmt:Ljava/lang/String;
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
const-string v5, "icon_hash"
|
|
|
|
iget-object v6, p1, Lio/fabric/sdk/android/a/g/w;->bmt:Ljava/lang/String;
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
iget-object v5, p1, Lio/fabric/sdk/android/a/g/w;->bms:Ljava/lang/String;
|
|
|
|
invoke-static {v5}, Lio/fabric/sdk/android/a/b/i;->O(Ljava/lang/String;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
const-string v6, "instance"
|
|
|
|
invoke-interface {v4, v6, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v4}, Lio/fabric/sdk/android/a/g/l;->p(Ljava/util/Map;)Lio/fabric/sdk/android/a/e/d;
|
|
|
|
move-result-object v5
|
|
: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 v6, "X-CRASHLYTICS-API-KEY"
|
|
|
|
iget-object v7, p1, Lio/fabric/sdk/android/a/g/w;->sc:Ljava/lang/String;
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-API-CLIENT-TYPE"
|
|
|
|
const-string v7, "android"
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-API-CLIENT-VERSION"
|
|
|
|
iget-object v7, p0, Lio/fabric/sdk/android/a/g/l;->re:Lio/fabric/sdk/android/i;
|
|
|
|
invoke-virtual {v7}, Lio/fabric/sdk/android/i;->getVersion()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "Accept"
|
|
|
|
const-string v7, "application/json"
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-DEVICE-MODEL"
|
|
|
|
iget-object v7, p1, Lio/fabric/sdk/android/a/g/w;->sE:Ljava/lang/String;
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-OS-BUILD-VERSION"
|
|
|
|
iget-object v7, p1, Lio/fabric/sdk/android/a/g/w;->bmq:Ljava/lang/String;
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-OS-DISPLAY-VERSION"
|
|
|
|
iget-object v7, p1, Lio/fabric/sdk/android/a/g/w;->bmr:Ljava/lang/String;
|
|
|
|
invoke-static {v5, v6, v7}, Lio/fabric/sdk/android/a/g/l;->a(Lio/fabric/sdk/android/a/e/d;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v6, "X-CRASHLYTICS-INSTALLATION-ID"
|
|
|
|
iget-object p1, p1, Lio/fabric/sdk/android/a/g/w;->sA:Ljava/lang/String;
|
|
|
|
invoke-static {v5, v6, 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;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
const-string v7, "Requesting settings from "
|
|
|
|
invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v7, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {p1, v2, v6}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v6, "Settings query params were: "
|
|
|
|
invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v6, v4}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {p1, v2, v4}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v5}, Lio/fabric/sdk/android/a/e/d;->DN()I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v6, "Settings result was: "
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v4, v2, v6}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/16 v4, 0xc8
|
|
|
|
if-eq p1, v4, :cond_3
|
|
|
|
const/16 v4, 0xc9
|
|
|
|
if-eq p1, v4, :cond_3
|
|
|
|
const/16 v4, 0xca
|
|
|
|
if-eq p1, v4, :cond_3
|
|
|
|
const/16 v4, 0xcb
|
|
|
|
if-ne p1, v4, :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 {v5}, Lio/fabric/sdk/android/a/e/d;->DO()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lio/fabric/sdk/android/a/g/l;->dM(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v3, p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
const-string v6, "Failed to retrieve settings from "
|
|
|
|
invoke-direct {v4, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v6, p0, Lio/fabric/sdk/android/a/b/a;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {v4, v6}, 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, v2, v4}, 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 v5, :cond_5
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
:goto_3
|
|
invoke-virtual {v5, v0}, Lio/fabric/sdk/android/a/e/d;->dI(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v2, v0}, 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 v5, v3
|
|
|
|
goto :goto_6
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
move-object v5, v3
|
|
|
|
:goto_4
|
|
:try_start_2
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v6, "Settings request failed."
|
|
|
|
invoke-interface {v4, v2, v6, 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 v5, :cond_5
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
:goto_5
|
|
return-object v3
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
:goto_6
|
|
if-eqz v5, :cond_6
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->CO()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v5, v0}, Lio/fabric/sdk/android/a/e/d;->dI(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v3, v2, v0}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_6
|
|
goto :goto_8
|
|
|
|
:goto_7
|
|
throw p1
|
|
|
|
:goto_8
|
|
goto :goto_7
|
|
.end method
|