259 lines
5.2 KiB
Smali
259 lines
5.2 KiB
Smali
.class public Le/h/a/f/c;
|
|
.super Lk/a/a/a/l;
|
|
.source "CrashlyticsNdk.java"
|
|
|
|
# interfaces
|
|
.implements Le/h/a/e/i0;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lk/a/a/a/l<",
|
|
"Ljava/lang/Void;",
|
|
">;",
|
|
"Le/h/a/e/i0;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public j:Le/h/a/f/a;
|
|
|
|
.field public k:Le/h/a/e/h0;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lk/a/a/a/l;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Ljava/lang/Object;
|
|
.locals 4
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Le/h/a/f/c;->j:Le/h/a/f/a;
|
|
|
|
invoke-virtual {v0}, Le/h/a/f/a;->a()Le/h/a/e/h0;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Le/h/a/f/c;->k:Le/h/a/e/h0;
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
invoke-static {}, Lk/a/a/a/f;->a()Lk/a/a/a/c;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "CrashlyticsNdk"
|
|
|
|
const/4 v3, 0x6
|
|
|
|
invoke-virtual {v1, v2, v3}, Lk/a/a/a/c;->a(Ljava/lang/String;I)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v1, "Could not process ndk data; "
|
|
|
|
invoke-static {v2, v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:cond_0
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public e()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "com.crashlytics.sdk.android.crashlytics-ndk"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public g()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "2.1.0.33"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public l()Z
|
|
.locals 7
|
|
|
|
const-class v0, Le/h/a/e/d0;
|
|
|
|
invoke-static {v0}, Lk/a/a/a/f;->a(Ljava/lang/Class;)Lk/a/a/a/l;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Le/h/a/e/d0;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
new-instance v1, Le/h/a/f/a;
|
|
|
|
iget-object v2, p0, Lk/a/a/a/l;->f:Landroid/content/Context;
|
|
|
|
new-instance v3, Lcom/crashlytics/android/ndk/JniNativeApi;
|
|
|
|
invoke-direct {v3}, Lcom/crashlytics/android/ndk/JniNativeApi;-><init>()V
|
|
|
|
new-instance v4, Le/h/a/f/e;
|
|
|
|
new-instance v5, Lk/a/a/a/p/f/b;
|
|
|
|
invoke-direct {v5, p0}, Lk/a/a/a/p/f/b;-><init>(Lk/a/a/a/l;)V
|
|
|
|
invoke-direct {v4, v5}, Le/h/a/f/e;-><init>(Lk/a/a/a/p/f/a;)V
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Le/h/a/f/a;-><init>(Landroid/content/Context;Le/h/a/f/d;Le/h/a/f/b;)V
|
|
|
|
iput-object v1, p0, Le/h/a/f/c;->j:Le/h/a/f/a;
|
|
|
|
iget-object v2, v1, Le/h/a/f/a;->c:Le/h/a/f/b;
|
|
|
|
check-cast v2, Le/h/a/f/e;
|
|
|
|
invoke-virtual {v2}, Le/h/a/f/e;->a()Ljava/io/File;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->mkdir()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v5
|
|
|
|
new-instance v3, Ljava/io/File;
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->toString(J)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v3, v2, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3}, Ljava/io/File;->mkdir()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
move-object v3, v4
|
|
|
|
:goto_1
|
|
const/4 v2, 0x0
|
|
|
|
const-string v5, "CrashlyticsNdk"
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
:try_start_0
|
|
invoke-virtual {v3}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v6, v1, Le/h/a/f/a;->b:Le/h/a/f/d;
|
|
|
|
iget-object v1, v1, Le/h/a/f/a;->a:Landroid/content/Context;
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v6, v3, v1}, Le/h/a/f/d;->a(Ljava/lang/String;Landroid/content/res/AssetManager;)Z
|
|
|
|
move-result v2
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
invoke-static {}, Lk/a/a/a/f;->a()Lk/a/a/a/c;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v6, 0x6
|
|
|
|
invoke-virtual {v3, v5, v6}, Lk/a/a/a/c;->a(Ljava/lang/String;I)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
const-string v3, "Error initializing CrashlyticsNdk"
|
|
|
|
invoke-static {v5, v3, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:cond_2
|
|
:goto_2
|
|
if-eqz v2, :cond_3
|
|
|
|
iput-object p0, v0, Le/h/a/e/d0;->w:Le/h/a/e/i0;
|
|
|
|
invoke-static {}, Lk/a/a/a/f;->a()Lk/a/a/a/c;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-virtual {v0, v5, v1}, Lk/a/a/a/c;->a(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const-string v0, "Crashlytics NDK initialization successful"
|
|
|
|
invoke-static {v5, v0, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:cond_3
|
|
return v2
|
|
|
|
:cond_4
|
|
new-instance v0, Lk/a/a/a/p/c/n;
|
|
|
|
const-string v1, "CrashlyticsNdk requires Crashlytics"
|
|
|
|
invoke-direct {v0, v1}, Lk/a/a/a/p/c/n;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|