2019-02-04 20:08:30 +00:00
|
|
|
.class final Lcom/crashlytics/android/core/ae;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field static final UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private final rS:Ljava/io/File;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "UTF-8"
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sput-object v0, Lcom/crashlytics/android/core/ae;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Ljava/io/File;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/crashlytics/android/core/ae;->rS:Ljava/io/File;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static a(Lcom/crashlytics/android/core/ay;)Ljava/lang/String;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lorg/json/JSONException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lcom/crashlytics/android/core/ae$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/crashlytics/android/core/ae$1;-><init>(Lcom/crashlytics/android/core/ay;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/crashlytics/android/core/ae$1;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static b(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static l(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
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lorg/json/JSONException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lorg/json/JSONObject;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final T(Ljava/lang/String;)Lcom/crashlytics/android/core/ay;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/crashlytics/android/core/ae;->U(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->exists()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
sget-object p1, Lcom/crashlytics/android/core/ay;->sA:Lcom/crashlytics/android/core/ay;
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
new-instance v1, Ljava/io/FileInputStream;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-static {v1}, Lio/fabric/sdk/android/a/b/i;->r(Ljava/io/InputStream;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string p1, "userId"
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lcom/crashlytics/android/core/ae;->b(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v2, "userName"
|
|
|
|
|
|
|
|
invoke-static {v0, v2}, Lcom/crashlytics/android/core/ae;->b(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "userEmail"
|
|
|
|
|
|
|
|
invoke-static {v0, v3}, Lcom/crashlytics/android/core/ae;->b(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v3, Lcom/crashlytics/android/core/ay;
|
|
|
|
|
|
|
|
invoke-direct {v3, p1, v2, v0}, Lcom/crashlytics/android/core/ay;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const-string p1, "Failed to close user metadata file."
|
|
|
|
|
|
|
|
invoke-static {v1, p1}, Lio/fabric/sdk/android/a/b/i;->a(Ljava/io/Closeable;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object v3
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
move-object v0, v1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
:try_start_2
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->DG()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "CrashlyticsCore"
|
|
|
|
|
|
|
|
const-string v3, "Error deserializing user metadata."
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v3, 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
|
|
|
|
|
|
|
|
const-string p1, "Failed to close user metadata file."
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lio/fabric/sdk/android/a/b/i;->a(Ljava/io/Closeable;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
sget-object p1, Lcom/crashlytics/android/core/ay;->sA:Lcom/crashlytics/android/core/ay;
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
const-string v0, "Failed to close user metadata file."
|
|
|
|
|
|
|
|
invoke-static {v1, v0}, Lio/fabric/sdk/android/a/b/i;->a(Ljava/io/Closeable;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final U(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/ae;->rS:Ljava/io/File;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, "user.meta"
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final V(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/ae;->rS:Ljava/io/File;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, "keys.meta"
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|