b.smali
.class public final Lxf/b;
.super Lza/a;
.source "RNInitTask.kt"
# annotations
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0008\u00c6\u0002\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0018\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000b2\u0006\u0010\u000c\u001a\u00020\rH\u0002J\u0014\u0010\u000e\u001a\u00020\t2\n\u0010\u000f\u001a\u00060\u0010j\u0002`\u0011H\u0016J\u0008\u0010\u0012\u001a\u00020\tH\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0013"
}
d2 = {
"Lcom/shopee/foody/driver/global/init/tasks/rn/RNInitTask;",
"Lcom/shopee/android/network/service/NeedOkHttpClientInitTask;",
"()V",
"KEY_RN_BUNDLE_ID",
"",
"TAG",
"reactImpl",
"Lcom/shopee/android/react/service/IReactService;",
"notifyNavBarStateToRN",
"",
"show",
"",
"height",
"",
"onError",
"exception",
"Ljava/lang/Exception;",
"Lkotlin/Exception;",
"run",
"driver_indonesiaRelease"
}
k = 0x1
mv = {
0x1,
0x1,
0x10
}
.end annotation
# static fields
.field public static final e:Lcom/shopee/android/react/service/IReactService;
.field public static final f:Lxf/b;
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Lxf/b;
invoke-direct {v0}, Lxf/b;-><init>()V
sput-object v0, Lxf/b;->f:Lxf/b;
const-class v0, Lcom/shopee/android/react/service/IReactService;
invoke-static {v0}, Ltb/b;->b(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/shopee/android/react/service/IReactService;
sput-object v0, Lxf/b;->e:Lcom/shopee/android/react/service/IReactService;
return-void
.end method
.method public constructor <init>()V
.registers 2
const-string v0, "RNInitTask"
invoke-direct {p0, v0}, Lza/a;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public static final synthetic a(Lxf/b;ZI)V
.registers 3
invoke-virtual {p0, p1, p2}, Lxf/b;->a(ZI)V
return-void
.end method
# virtual methods
.method public a(Ljava/lang/Exception;)V
.registers 3
sget-object v0, Ljd/b;->c:Ljd/b$a;
invoke-virtual {v0}, Ljd/b$a;->b()Z
move-result v0
if-nez v0, :cond_9
return-void
:cond_9
throw p1
.end method
.method public final a(ZI)V
.registers 6
sget-object v0, Lxf/b;->e:Lcom/shopee/android/react/service/IReactService;
if-eqz v0, :cond_21
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
const-string v2, "show"
invoke-virtual {v1, v2, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;
const-string p1, "height"
invoke-virtual {v1, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
invoke-virtual {v1}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object p1
const-string p2, "JSONObject().apply {\n \u2026ght)\n }.toString()"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "navBarStateChangedEvent"
invoke-interface {v0, p2, p1}, Lcom/shopee/android/react/service/IReactService;->emitEventToRN(Ljava/lang/String;Ljava/lang/String;)V
:cond_21
return-void
.end method
.method public run()V
.registers 7
sget-object v0, Lxf/b;->e:Lcom/shopee/android/react/service/IReactService;
if-eqz v0, :cond_37
sget-object v1, Ljd/b;->c:Ljd/b$a;
invoke-virtual {v1}, Ljd/b$a;->a()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
if-eqz v1, :cond_2f
check-cast v1, Landroid/app/Application;
new-instance v2, Lxf/b$a;
invoke-direct {v2}, Lxf/b$a;-><init>()V
new-instance v3, Lxf/a;
invoke-direct {v3}, Lxf/a;-><init>()V
sget-object v4, Luf/a;->e:Luf/a;
invoke-virtual {v4}, Luf/a;->e()Lza/b;
move-result-object v4
invoke-virtual {p0, v4}, Lza/a;->a(Lza/b;)Lokhttp3/OkHttpClient;
move-result-object v4
new-instance v5, Lxf/c;
invoke-direct {v5}, Lxf/c;-><init>()V
invoke-interface/range {v0 .. v5}, Lcom/shopee/android/react/service/IReactService;->init(Landroid/app/Application;Lnb/b;Lnb/d;Lokhttp3/OkHttpClient;Lnb/a;)V
goto :goto_37
:cond_2f
new-instance v0, Lkotlin/TypeCastException;
const-string v1, "null cannot be cast to non-null type android.app.Application"
invoke-direct {v0, v1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw v0
:cond_37
:goto_37
invoke-static {}, Lcom/shopee/react/ReactSDK;->get()Lcom/shopee/react/ReactSDK;
move-result-object v0
const-string v1, "ReactSDK.get()"
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0}, Lcom/shopee/react/ReactSDK;->getReactInstanceManager()Lcom/facebook/react/ReactInstanceManager;
move-result-object v0
if-eqz v0, :cond_4b
sget-object v1, Lxf/b$b;->a:Lxf/b$b;
invoke-virtual {v0, v1}, Lcom/facebook/react/ReactInstanceManager;->addReactInstanceEventListener(Lcom/facebook/react/ReactInstanceManager$ReactInstanceEventListener;)V
:cond_4b
sget-object v0, Lfg/a;->d:Lfg/a;
invoke-virtual {v0}, Lfg/a;->e()Lcom/shopee/hamster/base/apm/api/params/IHamsterParams;
move-result-object v0
if-eqz v0, :cond_66
const-class v1, Lcom/shopee/android/react/service/IReactService;
invoke-static {v1}, Ltb/b;->b(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/shopee/android/react/service/IReactService;
if-eqz v1, :cond_62
invoke-interface {v1}, Lcom/shopee/android/react/service/IReactService;->getCurrentRNVersion()Ljava/lang/String;
move-result-object v1
goto :goto_63
:cond_62
const/4 v1, 0x0
:goto_63
invoke-interface {v0, v1}, Lcom/shopee/hamster/base/apm/api/params/IHamsterParams;->setRnBundleVersion(Ljava/lang/String;)V
:cond_66
invoke-static {}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->getInstance()Lcom/google/firebase/crashlytics/FirebaseCrashlytics;
move-result-object v0
sget-object v1, Lxf/b;->e:Lcom/shopee/android/react/service/IReactService;
if-eqz v1, :cond_75
invoke-interface {v1}, Lcom/shopee/android/react/service/IReactService;->getCurrentRNVersion()Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_75
goto :goto_77
:cond_75
const-string v1, "-1"
:goto_77
const-string v2, "rn_bundle_id"
invoke-virtual {v0, v2, v1}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->setCustomKey(Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lc9/k;->e:Lc9/k;
new-instance v1, Lxf/b$c;
invoke-direct {v1}, Lxf/b$c;-><init>()V
invoke-virtual {v0, v1}, Lc9/k;->a(Lc9/k$b;)V
return-void
.end method