ReactRootView.smali

.class public Lcom/facebook/react/ReactRootView;
.super Landroid/widget/FrameLayout;
.source "SourceFile"

# interfaces
.implements Lcom/facebook/react/uimanager/RootView;
.implements Lcom/facebook/react/uimanager/ReactRoot;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;,
        Lcom/facebook/react/ReactRootView$CustomDisplayListener;,
        Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;,
        Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "ReactRootView"

.field private static mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;


# instance fields
.field private keyboardVisibility:Z

.field private final mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

.field private mAppProperties:Landroid/os/Bundle;

.field private mCustomApplyWindowInsetsListener:Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

.field private mCustomDisplayListener:Lcom/facebook/react/ReactRootView$CustomDisplayListener;

.field private mCustomGlobalLayoutListener:Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

.field private mHeightMeasureSpec:I

.field private mInitialUITemplate:Ljava/lang/String;

.field private mIsAttachedToInstance:Z

.field private mJSModuleName:Ljava/lang/String;

.field private mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

.field private mLastHeight:I

.field private mLastWidth:I

.field private mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

.field private mRootViewEventListener:Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;

.field private mRootViewTag:I

.field private mShouldLogContentAppeared:Z

.field private mUIManagerType:I

.field private final mUseSurface:Z

.field private mWasMeasured:Z

.field private mWidthMeasureSpec:I

.field private manager:Landroid/hardware/display/DisplayManager;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3

    .line 1
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 2
    new-instance p1, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-direct {p1, p0}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    .line 4
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    iput v0, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    .line 5
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    iput v0, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    .line 6
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    .line 7
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    const/4 v0, 0x1

    .line 8
    iput v0, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    .line 9
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    .line 10
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    .line 11
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->init()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 3

    .line 23
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 24
    new-instance p1, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-direct {p1, p0}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    const/4 p1, 0x0

    .line 25
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    .line 26
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result p2

    iput p2, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    .line 27
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result p2

    iput p2, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    .line 28
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    .line 29
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    const/4 p2, 0x1

    .line 30
    iput p2, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    .line 31
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    .line 32
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    .line 33
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->init()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4

    .line 34
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 35
    new-instance p1, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-direct {p1, p0}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    const/4 p1, 0x0

    .line 36
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    .line 37
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result p2

    iput p2, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    .line 38
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result p2

    iput p2, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    .line 39
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    .line 40
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    const/4 p2, 0x1

    .line 41
    iput p2, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    .line 42
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    .line 43
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    .line 44
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->init()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Z)V
    .registers 4

    .line 12
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 13
    new-instance p1, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-direct {p1, p0}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    const/4 p1, 0x0

    .line 14
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    .line 15
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    iput v0, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    .line 16
    invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    iput v0, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    .line 17
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    .line 18
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    const/4 v0, 0x1

    .line 19
    iput v0, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    .line 20
    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    .line 21
    iput-boolean p2, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    .line 22
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->init()V

    return-void
.end method

.method public static synthetic access$100(Lcom/facebook/react/ReactRootView;)Z
    .registers 1

    iget-boolean p0, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    return p0
.end method

.method public static synthetic access$102(Lcom/facebook/react/ReactRootView;Z)Z
    .registers 2

    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->keyboardVisibility:Z

    return p1
.end method

.method public static synthetic access$200(Lcom/facebook/react/ReactRootView;)I
    .registers 1

    iget p0, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    return p0
.end method

.method public static synthetic access$300(Lcom/facebook/react/ReactRootView;)Lcom/facebook/react/ReactInstanceManager;
    .registers 1

    iget-object p0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    return-object p0
.end method

.method public static synthetic access$400(Lcom/facebook/react/ReactRootView;)Z
    .registers 1

    iget-boolean p0, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    return p0
.end method

.method private attachToReactInstanceManager()V
    .registers 7

    const-wide/16 v0, 0x0

    const-string v2, "attachToReactInstanceManager"

    .line 1
    invoke-static {v0, v1, v2}, Lcom/facebook/systrace/Systrace;->beginSection(JLjava/lang/String;)V

    .line 2
    iget-boolean v2, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v2, :cond_c

    return-void

    :cond_c
    const/4 v2, 0x1

    .line 3
    :try_start_d
    iput-boolean v2, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    .line 4
    iget-object v2, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    invoke-static {v2}, Lcom/facebook/infer/annotation/Assertions;->assertNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/facebook/react/ReactInstanceManager;

    invoke-virtual {v2, p0}, Lcom/facebook/react/ReactInstanceManager;->attachRootView(Lcom/facebook/react/uimanager/ReactRoot;)V

    .line 5
    invoke-virtual {p0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v2

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomGlobalLayoutListener()Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    .line 6
    sget-boolean v2, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_GLOBAL_LAYOUT_FLAG:Z

    if-eqz v2, :cond_32

    .line 7
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomApplyWindowInsetsListener()Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    move-result-object v2

    sget-object v3, Landroidx/core/view/y;->a:Ljava/util/WeakHashMap;

    .line 8
    invoke-static {p0, v2}, Landroidx/core/view/y$h;->u(Landroid/view/View;Landroidx/core/view/p;)V

    .line 9
    :cond_32
    sget-boolean v2, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_DISPLAY_MANAGER_FLAG:Z

    if-eqz v2, :cond_4a

    .line 10
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getDisplayManager()Landroid/hardware/display/DisplayManager;

    move-result-object v2

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomDisplayListener()Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    move-result-object v3

    new-instance v4, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v5

    invoke-direct {v4, v5}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    invoke-virtual {v2, v3, v4}, Landroid/hardware/display/DisplayManager;->registerDisplayListener(Landroid/hardware/display/DisplayManager$DisplayListener;Landroid/os/Handler;)V
    :try_end_4a
    .catchall {:try_start_d .. :try_end_4a} :catchall_4e

    .line 11
    :cond_4a
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    return-void

    :catchall_4e
    move-exception v2

    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 12
    throw v2
.end method

.method private dispatchJSTouchEvent(Landroid/view/MotionEvent;)V
    .registers 5

    .line 1
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_7

    .line 2
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchJSTouchEventStart(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    .line 3
    :cond_7
    :try_start_7
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;
    :try_end_9
    .catchall {:try_start_7 .. :try_end_9} :catchall_55

    const-string v1, "ReactRootView"

    if-eqz v0, :cond_48

    :try_start_d
    iget-boolean v2, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v2, :cond_48

    .line 4
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-nez v0, :cond_18

    goto :goto_48

    .line 5
    :cond_18
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    if-nez v0, :cond_29

    const-string v0, "Unable to dispatch touch to JS before the dispatcher is available"

    .line 6
    invoke-static {v1, v0}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_21
    .catchall {:try_start_d .. :try_end_21} :catchall_55

    .line 7
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_28

    .line 8
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchJSTouchEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_28
    return-void

    .line 9
    :cond_29
    :try_start_29
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    .line 10
    const-class v1, Lcom/facebook/react/uimanager/UIManagerModule;

    .line 11
    invoke-virtual {v0, v1}, Lcom/facebook/react/bridge/ReactContext;->getNativeModule(Ljava/lang/Class;)Lcom/facebook/react/bridge/NativeModule;

    move-result-object v0

    check-cast v0, Lcom/facebook/react/uimanager/UIManagerModule;

    invoke-virtual {v0}, Lcom/facebook/react/uimanager/UIManagerModule;->getEventDispatcher()Lcom/facebook/react/uimanager/events/EventDispatcher;

    move-result-object v0

    .line 12
    iget-object v1, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    invoke-virtual {v1, p1, v0}, Lcom/facebook/react/uimanager/JSTouchDispatcher;->handleTouchEvent(Landroid/view/MotionEvent;Lcom/facebook/react/uimanager/events/EventDispatcher;)V
    :try_end_40
    .catchall {:try_start_29 .. :try_end_40} :catchall_55

    .line 13
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_47

    .line 14
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchJSTouchEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_47
    return-void

    :cond_48
    :goto_48
    :try_start_48
    const-string v0, "Unable to dispatch touch to JS as the catalyst instance has not been attached"

    .line 15
    invoke-static {v1, v0}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_4d
    .catchall {:try_start_48 .. :try_end_4d} :catchall_55

    .line 16
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_54

    .line 17
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchJSTouchEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_54
    return-void

    :catchall_55
    move-exception v0

    .line 18
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_5d

    .line 19
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchJSTouchEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    .line 20
    :cond_5d
    throw v0
.end method

.method private getCustomApplyWindowInsetsListener()Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomApplyWindowInsetsListener:Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    if-nez v0, :cond_b

    .line 2
    new-instance v0, Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    invoke-direct {v0, p0}, Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomApplyWindowInsetsListener:Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    .line 3
    :cond_b
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomApplyWindowInsetsListener:Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    return-object v0
.end method

.method private getCustomDisplayListener()Lcom/facebook/react/ReactRootView$CustomDisplayListener;
    .registers 3

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomDisplayListener:Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    if-nez v0, :cond_c

    .line 2
    new-instance v0, Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/facebook/react/ReactRootView$CustomDisplayListener;-><init>(Lcom/facebook/react/ReactRootView;Lcom/facebook/react/ReactRootView$1;)V

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomDisplayListener:Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    .line 3
    :cond_c
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomDisplayListener:Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    return-object v0
.end method

.method private getCustomGlobalLayoutListener()Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomGlobalLayoutListener:Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    if-nez v0, :cond_b

    .line 2
    new-instance v0, Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    invoke-direct {v0, p0}, Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;-><init>(Lcom/facebook/react/ReactRootView;)V

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomGlobalLayoutListener:Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    .line 3
    :cond_b
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mCustomGlobalLayoutListener:Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    return-object v0
.end method

.method private getDisplayManager()Landroid/hardware/display/DisplayManager;
    .registers 3

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->manager:Landroid/hardware/display/DisplayManager;

    if-nez v0, :cond_12

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "display"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/hardware/display/DisplayManager;

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->manager:Landroid/hardware/display/DisplayManager;

    .line 3
    :cond_12
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->manager:Landroid/hardware/display/DisplayManager;

    return-object v0
.end method

.method private init()V
    .registers 3

    const/4 v0, 0x0

    .line 1
    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->setClipChildren(Z)V

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_d

    .line 3
    iget-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    invoke-interface {v0, p0, v1}, Lcom/facebook/react/ReactRootViewDelegate;->onInit(Lcom/facebook/react/ReactRootView;Z)V

    :cond_d
    return-void
.end method

.method private removeOnGlobalLayoutListener()V
    .registers 3

    .line 1
    invoke-virtual {p0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v0

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomGlobalLayoutListener()Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/view/ViewTreeObserver;->removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    .line 2
    sget-boolean v0, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_GLOBAL_LAYOUT_FLAG:Z

    if-eqz v0, :cond_15

    const/4 v0, 0x0

    .line 3
    sget-object v1, Landroidx/core/view/y;->a:Ljava/util/WeakHashMap;

    .line 4
    invoke-static {p0, v0}, Landroidx/core/view/y$h;->u(Landroid/view/View;Landroidx/core/view/p;)V

    :cond_15
    return-void
.end method

.method public static setReactRootViewDelegate(Lcom/facebook/react/ReactRootViewDelegate;)V
    .registers 1

    sput-object p0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    return-void
.end method

.method private updateRootLayoutSpecs(II)V
    .registers 5

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-nez v0, :cond_c

    const-string p1, "ReactRootView"

    const-string p2, "Unable to update root layout specs for uninitialized ReactInstanceManager"

    .line 2
    invoke-static {p1, p2}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 3
    :cond_c
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-eqz v0, :cond_23

    .line 4
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getUIManagerType()I

    move-result v1

    invoke-static {v0, v1}, Lcom/facebook/react/uimanager/UIManagerHelper;->getUIManager(Lcom/facebook/react/bridge/ReactContext;I)Lcom/facebook/react/bridge/UIManager;

    move-result-object v0

    if-eqz v0, :cond_23

    .line 5
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getRootViewTag()I

    move-result v1

    invoke-interface {v0, v1, p1, p2}, Lcom/facebook/react/bridge/UIManager;->updateRootLayoutSpecs(III)V

    :cond_23
    return-void
.end method


# virtual methods
.method public dispatchDraw(Landroid/graphics/Canvas;)V
    .registers 4

    .line 1
    :try_start_0
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchDraw(Landroid/graphics/Canvas;)V
    :try_end_3
    .catch Ljava/lang/StackOverflowError; {:try_start_0 .. :try_end_3} :catch_d
    .catchall {:try_start_0 .. :try_end_3} :catchall_b

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_18

    .line 3
    :goto_7
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchDraw(Lcom/facebook/react/ReactRootView;Landroid/graphics/Canvas;)V

    goto :goto_18

    :catchall_b
    move-exception v0

    goto :goto_19

    :catch_d
    move-exception v0

    .line 4
    :try_start_e
    invoke-virtual {p0, v0}, Lcom/facebook/react/ReactRootView;->handleException(Ljava/lang/Throwable;)V
    :try_end_11
    .catchall {:try_start_e .. :try_end_11} :catchall_b

    .line 5
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_18

    .line 6
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    goto :goto_7

    :cond_18
    :goto_18
    return-void

    .line 7
    :goto_19
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_20

    .line 8
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchDraw(Lcom/facebook/react/ReactRootView;Landroid/graphics/Canvas;)V

    .line 9
    :cond_20
    throw v0
.end method

.method public dispatchKeyEvent(Landroid/view/KeyEvent;)Z
    .registers 4

    .line 1
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_7

    .line 2
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchKeyEventStart(Lcom/facebook/react/ReactRootView;Landroid/view/KeyEvent;)V

    .line 3
    :cond_7
    :try_start_7
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v0, :cond_27

    iget-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v1, :cond_27

    .line 4
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-nez v0, :cond_16

    goto :goto_27

    .line 5
    :cond_16
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-virtual {v0, p1}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;->handleKeyEvent(Landroid/view/KeyEvent;)V

    .line 6
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchKeyEvent(Landroid/view/KeyEvent;)Z

    move-result v0
    :try_end_1f
    .catchall {:try_start_7 .. :try_end_1f} :catchall_3a

    .line 7
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_26

    .line 8
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchKeyEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/KeyEvent;)V

    :cond_26
    return v0

    :cond_27
    :goto_27
    :try_start_27
    const-string v0, "ReactRootView"

    const-string v1, "Unable to handle key event as the catalyst instance has not been attached"

    .line 9
    invoke-static {v0, v1}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchKeyEvent(Landroid/view/KeyEvent;)Z

    move-result v0
    :try_end_32
    .catchall {:try_start_27 .. :try_end_32} :catchall_3a

    .line 11
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_39

    .line 12
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchKeyEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/KeyEvent;)V

    :cond_39
    return v0

    :catchall_3a
    move-exception v0

    .line 13
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_42

    .line 14
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onDispatchKeyEventEnd(Lcom/facebook/react/ReactRootView;Landroid/view/KeyEvent;)V

    .line 15
    :cond_42
    throw v0
.end method

.method public finalize()V
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 1
    invoke-super {p0}, Ljava/lang/Object;->finalize()V

    .line 2
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    xor-int/lit8 v0, v0, 0x1

    const-string v1, "The application this ReactRootView was rendering was not unmounted before the ReactRootView was garbage collected. This usually means that your application is leaking large amounts of memory. To solve this, make sure to call ReactRootView#unmountReactApplication in the onDestroy() of your hosting Activity or in the onDestroyView() of your hosting Fragment."

    invoke-static {v0, v1}, Lcom/facebook/infer/annotation/Assertions;->assertCondition(ZLjava/lang/String;)V

    .line 3
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_13

    .line 4
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onFinalize(Lcom/facebook/react/ReactRootView;)V

    :cond_13
    return-void
.end method

.method public getAppProperties()Landroid/os/Bundle;
    .registers 2

    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mAppProperties:Landroid/os/Bundle;

    return-object v0
.end method

.method public getHeightMeasureSpec()I
    .registers 2

    iget v0, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    return v0
.end method

.method public getInitialUITemplate()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mInitialUITemplate:Ljava/lang/String;

    return-object v0
.end method

.method public getJSModuleName()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSModuleName:Ljava/lang/String;

    invoke-static {v0}, Lcom/facebook/infer/annotation/Assertions;->assertNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    return-object v0
.end method

.method public getJSModuleNameOrNull()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSModuleName:Ljava/lang/String;

    return-object v0
.end method

.method public getReactInstanceManager()Lcom/facebook/react/ReactInstanceManager;
    .registers 2

    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    return-object v0
.end method

.method public getRootViewGroup()Landroid/view/ViewGroup;
    .registers 1

    return-object p0
.end method

.method public getRootViewTag()I
    .registers 2

    iget v0, p0, Lcom/facebook/react/ReactRootView;->mRootViewTag:I

    return v0
.end method

.method public getSurfaceID()Ljava/lang/String;
    .registers 3

    .line 1
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getAppProperties()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_d

    const-string v1, "surfaceID"

    .line 2
    invoke-virtual {v0, v1}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_e

    :cond_d
    const/4 v0, 0x0

    :goto_e
    return-object v0
.end method

.method public getUIManagerType()I
    .registers 2

    iget v0, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    return v0
.end method

.method public getWidthMeasureSpec()I
    .registers 2

    iget v0, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    return v0
.end method

.method public handleException(Ljava/lang/Throwable;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v0, :cond_1d

    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-eqz v0, :cond_1d

    .line 2
    new-instance v0, Lcom/facebook/react/uimanager/IllegalViewOperationException;

    invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1, p0, p1}, Lcom/facebook/react/uimanager/IllegalViewOperationException;-><init>(Ljava/lang/String;Landroid/view/View;Ljava/lang/Throwable;)V

    .line 3
    iget-object p1, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    invoke-virtual {p1}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object p1

    invoke-virtual {p1, v0}, Lcom/facebook/react/bridge/ReactContext;->handleException(Ljava/lang/Exception;)V

    return-void

    .line 4
    :cond_1d
    new-instance v0, Ljava/lang/RuntimeException;

    invoke-direct {v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V

    throw v0
.end method

.method public onAttachedToReactInstance()V
    .registers 2

    .line 1
    new-instance v0, Lcom/facebook/react/uimanager/JSTouchDispatcher;

    invoke-direct {v0, p0}, Lcom/facebook/react/uimanager/JSTouchDispatcher;-><init>(Landroid/view/ViewGroup;)V

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    .line 2
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mRootViewEventListener:Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;

    if-eqz v0, :cond_e

    .line 3
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;->onAttachedToReactInstance(Lcom/facebook/react/ReactRootView;)V

    .line 4
    :cond_e
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_15

    .line 5
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onAttachedToReactInstance(Lcom/facebook/react/ReactRootView;)V

    :cond_15
    return-void
.end method

.method public onAttachedToWindow()V
    .registers 5

    .line 1
    invoke-super {p0}, Landroid/view/ViewGroup;->onAttachedToWindow()V

    .line 2
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v0, :cond_3a

    .line 3
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->removeOnGlobalLayoutListener()V

    .line 4
    invoke-virtual {p0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v0

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomGlobalLayoutListener()Lcom/facebook/react/ReactRootView$CustomGlobalLayoutListener;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    .line 5
    sget-boolean v0, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_GLOBAL_LAYOUT_FLAG:Z

    if-eqz v0, :cond_22

    .line 6
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomApplyWindowInsetsListener()Lcom/facebook/react/ReactRootView$CustomApplyWindowInsetsListener;

    move-result-object v0

    sget-object v1, Landroidx/core/view/y;->a:Ljava/util/WeakHashMap;

    .line 7
    invoke-static {p0, v0}, Landroidx/core/view/y$h;->u(Landroid/view/View;Landroidx/core/view/p;)V

    .line 8
    :cond_22
    sget-boolean v0, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_DISPLAY_MANAGER_FLAG:Z

    if-eqz v0, :cond_3a

    .line 9
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getDisplayManager()Landroid/hardware/display/DisplayManager;

    move-result-object v0

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomDisplayListener()Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    move-result-object v1

    new-instance v2, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    invoke-virtual {v0, v1, v2}, Landroid/hardware/display/DisplayManager;->registerDisplayListener(Landroid/hardware/display/DisplayManager$DisplayListener;Landroid/os/Handler;)V

    .line 10
    :cond_3a
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_41

    .line 11
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onAttachedToWindow(Lcom/facebook/react/ReactRootView;)V

    :cond_41
    return-void
.end method

.method public onChildStartedNativeGesture(Landroid/view/MotionEvent;)V
    .registers 5

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;
    :try_end_2
    .catchall {:try_start_0 .. :try_end_2} :catchall_4e

    const-string v1, "ReactRootView"

    if-eqz v0, :cond_41

    :try_start_6
    iget-boolean v2, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v2, :cond_41

    .line 2
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-nez v0, :cond_11

    goto :goto_41

    .line 3
    :cond_11
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    if-nez v0, :cond_22

    const-string v0, "Unable to dispatch touch to JS before the dispatcher is available"

    .line 4
    invoke-static {v1, v0}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1a
    .catchall {:try_start_6 .. :try_end_1a} :catchall_4e

    .line 5
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_21

    .line 6
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onChildStartedNativeGesture(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_21
    return-void

    .line 7
    :cond_22
    :try_start_22
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    .line 8
    const-class v1, Lcom/facebook/react/uimanager/UIManagerModule;

    .line 9
    invoke-virtual {v0, v1}, Lcom/facebook/react/bridge/ReactContext;->getNativeModule(Ljava/lang/Class;)Lcom/facebook/react/bridge/NativeModule;

    move-result-object v0

    check-cast v0, Lcom/facebook/react/uimanager/UIManagerModule;

    invoke-virtual {v0}, Lcom/facebook/react/uimanager/UIManagerModule;->getEventDispatcher()Lcom/facebook/react/uimanager/events/EventDispatcher;

    move-result-object v0

    .line 10
    iget-object v1, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    invoke-virtual {v1, p1, v0}, Lcom/facebook/react/uimanager/JSTouchDispatcher;->onChildStartedNativeGesture(Landroid/view/MotionEvent;Lcom/facebook/react/uimanager/events/EventDispatcher;)V
    :try_end_39
    .catchall {:try_start_22 .. :try_end_39} :catchall_4e

    .line 11
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_40

    .line 12
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onChildStartedNativeGesture(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_40
    return-void

    :cond_41
    :goto_41
    :try_start_41
    const-string v0, "Unable to dispatch touch to JS as the catalyst instance has not been attached"

    .line 13
    invoke-static {v1, v0}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_46
    .catchall {:try_start_41 .. :try_end_46} :catchall_4e

    .line 14
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_4d

    .line 15
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onChildStartedNativeGesture(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    :cond_4d
    return-void

    :catchall_4e
    move-exception v0

    .line 16
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_56

    .line 17
    invoke-interface {v1, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onChildStartedNativeGesture(Lcom/facebook/react/ReactRootView;Landroid/view/MotionEvent;)V

    .line 18
    :cond_56
    throw v0
.end method

.method public onDetachedFromWindow()V
    .registers 3

    .line 1
    invoke-super {p0}, Landroid/view/ViewGroup;->onDetachedFromWindow()V

    .line 2
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v0, :cond_a

    .line 3
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->removeOnGlobalLayoutListener()V

    .line 4
    :cond_a
    sget-boolean v0, Lcom/facebook/react/util/Constants;->ENABLE_PROXY_DISPLAY_MANAGER_FLAG:Z

    if-eqz v0, :cond_19

    .line 5
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getDisplayManager()Landroid/hardware/display/DisplayManager;

    move-result-object v0

    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->getCustomDisplayListener()Lcom/facebook/react/ReactRootView$CustomDisplayListener;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/hardware/display/DisplayManager;->unregisterDisplayListener(Landroid/hardware/display/DisplayManager$DisplayListener;)V

    .line 6
    :cond_19
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_20

    .line 7
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onDetachedFromWindow(Lcom/facebook/react/ReactRootView;)V

    :cond_20
    return-void
.end method

.method public onFocusChanged(ZILandroid/graphics/Rect;)V
    .registers 6

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v0, :cond_1f

    iget-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v1, :cond_1f

    .line 2
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-nez v0, :cond_f

    goto :goto_1f

    .line 3
    :cond_f
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-virtual {v0}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;->clearFocus()V

    .line 4
    invoke-super {p0, p1, p2, p3}, Landroid/view/View;->onFocusChanged(ZILandroid/graphics/Rect;)V
    :try_end_17
    .catchall {:try_start_0 .. :try_end_17} :catchall_31

    .line 5
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_1e

    .line 6
    invoke-interface {v0, p0, p1, p2, p3}, Lcom/facebook/react/ReactRootViewDelegate;->onFocusChanged(Lcom/facebook/react/ReactRootView;ZILandroid/graphics/Rect;)V

    :cond_1e
    return-void

    :cond_1f
    :goto_1f
    :try_start_1f
    const-string v0, "ReactRootView"

    const-string v1, "Unable to handle focus changed event as the catalyst instance has not been attached"

    .line 7
    invoke-static {v0, v1}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V

    .line 8
    invoke-super {p0, p1, p2, p3}, Landroid/view/View;->onFocusChanged(ZILandroid/graphics/Rect;)V
    :try_end_29
    .catchall {:try_start_1f .. :try_end_29} :catchall_31

    .line 9
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_30

    .line 10
    invoke-interface {v0, p0, p1, p2, p3}, Lcom/facebook/react/ReactRootViewDelegate;->onFocusChanged(Lcom/facebook/react/ReactRootView;ZILandroid/graphics/Rect;)V

    :cond_30
    return-void

    :catchall_31
    move-exception v0

    .line 11
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_39

    .line 12
    invoke-interface {v1, p0, p1, p2, p3}, Lcom/facebook/react/ReactRootViewDelegate;->onFocusChanged(Lcom/facebook/react/ReactRootView;ZILandroid/graphics/Rect;)V

    .line 13
    :cond_39
    throw v0
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 2

    .line 1
    invoke-direct {p0, p1}, Lcom/facebook/react/ReactRootView;->dispatchJSTouchEvent(Landroid/view/MotionEvent;)V

    .line 2
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1
.end method

.method public onLayout(ZIIII)V
    .registers 14

    .line 1
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_d

    move-object v1, p0

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    .line 2
    invoke-interface/range {v0 .. v6}, Lcom/facebook/react/ReactRootViewDelegate;->onLayoutStart(Lcom/facebook/react/ReactRootView;ZIIII)V

    .line 3
    :cond_d
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    if-eqz v0, :cond_14

    .line 4
    invoke-super/range {p0 .. p5}, Landroid/widget/FrameLayout;->onLayout(ZIIII)V

    .line 5
    :cond_14
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_21

    move-object v2, p0

    move v3, p1

    move v4, p2

    move v5, p3

    move v6, p4

    move v7, p5

    .line 6
    invoke-interface/range {v1 .. v7}, Lcom/facebook/react/ReactRootViewDelegate;->onLayoutEnd(Lcom/facebook/react/ReactRootView;ZIIII)V

    :cond_21
    return-void
.end method

.method public onMeasure(II)V
    .registers 14

    .line 1
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    if-eqz v0, :cond_8

    .line 2
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onMeasure(II)V

    return-void

    .line 3
    :cond_8
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_f

    .line 4
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onMeasureStart(Lcom/facebook/react/ReactRootView;II)V

    :cond_f
    const-wide/16 v0, 0x0

    const-string v2, "ReactRootView.onMeasure"

    .line 5
    invoke-static {v0, v1, v2}, Lcom/facebook/systrace/Systrace;->beginSection(JLjava/lang/String;)V

    .line 6
    :try_start_16
    iget v2, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-ne p1, v2, :cond_23

    iget v2, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    if-eq p2, v2, :cond_21

    goto :goto_23

    :cond_21
    const/4 v2, 0x0

    goto :goto_24

    :cond_23
    :goto_23
    const/4 v2, 0x1

    .line 7
    :goto_24
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    .line 8
    iput p2, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    .line 9
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v5

    const/high16 v6, -0x80000000

    if-eq v5, v6, :cond_38

    if-nez v5, :cond_33

    goto :goto_38

    .line 10
    :cond_33
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v5

    goto :goto_5e

    :cond_38
    :goto_38
    const/4 v5, 0x0

    const/4 v7, 0x0

    .line 11
    :goto_3a
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v8

    if-ge v7, v8, :cond_5e

    .line 12
    invoke-virtual {p0, v7}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v8

    .line 13
    invoke-virtual {v8}, Landroid/view/View;->getLeft()I

    move-result v9

    .line 14
    invoke-virtual {v8}, Landroid/view/View;->getMeasuredWidth()I

    move-result v10

    add-int/2addr v9, v10

    .line 15
    invoke-virtual {v8}, Landroid/view/View;->getPaddingLeft()I

    move-result v10

    add-int/2addr v9, v10

    .line 16
    invoke-virtual {v8}, Landroid/view/View;->getPaddingRight()I

    move-result v8

    add-int/2addr v9, v8

    .line 17
    invoke-static {v5, v9}, Ljava/lang/Math;->max(II)I

    move-result v5

    add-int/lit8 v7, v7, 0x1

    goto :goto_3a

    .line 18
    :cond_5e
    :goto_5e
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v7

    if-eq v7, v6, :cond_6c

    if-nez v7, :cond_67

    goto :goto_6c

    .line 19
    :cond_67
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v4

    goto :goto_92

    :cond_6c
    :goto_6c
    const/4 v6, 0x0

    .line 20
    :goto_6d
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v7

    if-ge v4, v7, :cond_91

    .line 21
    invoke-virtual {p0, v4}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    .line 22
    invoke-virtual {v7}, Landroid/view/View;->getTop()I

    move-result v8

    .line 23
    invoke-virtual {v7}, Landroid/view/View;->getMeasuredHeight()I

    move-result v9

    add-int/2addr v8, v9

    .line 24
    invoke-virtual {v7}, Landroid/view/View;->getPaddingTop()I

    move-result v9

    add-int/2addr v8, v9

    .line 25
    invoke-virtual {v7}, Landroid/view/View;->getPaddingBottom()I

    move-result v7

    add-int/2addr v8, v7

    .line 26
    invoke-static {v6, v8}, Ljava/lang/Math;->max(II)I

    move-result v6

    add-int/lit8 v4, v4, 0x1

    goto :goto_6d

    :cond_91
    move v4, v6

    .line 27
    :goto_92
    invoke-virtual {p0, v5, v4}, Landroid/view/View;->setMeasuredDimension(II)V

    .line 28
    iput-boolean v3, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    .line 29
    iget-object v3, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v3, :cond_a3

    iget-boolean v3, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-nez v3, :cond_a3

    .line 30
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->attachToReactInstanceManager()V

    goto :goto_b4

    :cond_a3
    if-nez v2, :cond_ad

    .line 31
    iget v2, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    if-ne v2, v5, :cond_ad

    iget v2, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I

    if-eq v2, v4, :cond_b4

    .line 32
    :cond_ad
    iget v2, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    iget v3, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    invoke-direct {p0, v2, v3}, Lcom/facebook/react/ReactRootView;->updateRootLayoutSpecs(II)V

    .line 33
    :cond_b4
    :goto_b4
    iput v5, p0, Lcom/facebook/react/ReactRootView;->mLastWidth:I

    .line 34
    iput v4, p0, Lcom/facebook/react/ReactRootView;->mLastHeight:I
    :try_end_b8
    .catchall {:try_start_16 .. :try_end_b8} :catchall_c3

    .line 35
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 36
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_c2

    .line 37
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onMeasureEnd(Lcom/facebook/react/ReactRootView;II)V

    :cond_c2
    return-void

    :catchall_c3
    move-exception v2

    .line 38
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 39
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_ce

    .line 40
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onMeasureEnd(Lcom/facebook/react/ReactRootView;II)V

    .line 41
    :cond_ce
    throw v2
.end method

.method public onStage(I)V
    .registers 3

    const/16 v0, 0x65

    if-eq p1, v0, :cond_5

    goto :goto_8

    .line 1
    :cond_5
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->onAttachedToReactInstance()V

    .line 2
    :goto_8
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_f

    .line 3
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onStage(Lcom/facebook/react/ReactRootView;I)V

    :cond_f
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 2

    .line 1
    invoke-direct {p0, p1}, Lcom/facebook/react/ReactRootView;->dispatchJSTouchEvent(Landroid/view/MotionEvent;)V

    .line 2
    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    const/4 p1, 0x1

    return p1
.end method

.method public onViewAdded(Landroid/view/View;)V
    .registers 5

    .line 1
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->onViewAdded(Landroid/view/View;)V

    .line 2
    iget-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mShouldLogContentAppeared:Z

    if-eqz v0, :cond_15

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mShouldLogContentAppeared:Z

    .line 4
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSModuleName:Ljava/lang/String;

    if-eqz v0, :cond_15

    .line 5
    sget-object v1, Lcom/facebook/react/bridge/ReactMarkerConstants;->CONTENT_APPEARED:Lcom/facebook/react/bridge/ReactMarkerConstants;

    iget v2, p0, Lcom/facebook/react/ReactRootView;->mRootViewTag:I

    invoke-static {v1, v0, v2}, Lcom/facebook/react/bridge/ReactMarker;->logMarker(Lcom/facebook/react/bridge/ReactMarkerConstants;Ljava/lang/String;I)V

    .line 6
    :cond_15
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_1c

    .line 7
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onViewAdded(Lcom/facebook/react/ReactRootView;Landroid/view/View;)V

    :cond_1c
    return-void
.end method

.method public onVisibilityAggregated(Z)V
    .registers 3

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onVisibilityAggregated(Z)V

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_a

    .line 3
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onVisibilityAggregated(Lcom/facebook/react/ReactRootView;Z)V

    :cond_a
    return-void
.end method

.method public onVisibilityChanged(Landroid/view/View;I)V
    .registers 4

    .line 1
    invoke-super {p0, p1, p2}, Landroid/view/View;->onVisibilityChanged(Landroid/view/View;I)V

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_a

    .line 3
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onVisibilityChanged(Lcom/facebook/react/ReactRootView;Landroid/view/View;I)V

    :cond_a
    return-void
.end method

.method public onWindowFocusChanged(Z)V
    .registers 3

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onWindowFocusChanged(Z)V

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_a

    .line 3
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onWindowFocusChanged(Lcom/facebook/react/ReactRootView;Z)V

    :cond_a
    return-void
.end method

.method public onWindowVisibilityChanged(I)V
    .registers 3

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onWindowVisibilityChanged(I)V

    .line 2
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_a

    .line 3
    invoke-interface {v0, p0, p1}, Lcom/facebook/react/ReactRootViewDelegate;->onWindowVisibilityChanged(Lcom/facebook/react/ReactRootView;I)V

    :cond_a
    return-void
.end method

.method public requestChildFocus(Landroid/view/View;Landroid/view/View;)V
    .registers 5

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v0, :cond_1f

    iget-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v1, :cond_1f

    .line 2
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    if-nez v0, :cond_f

    goto :goto_1f

    .line 3
    :cond_f
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mAndroidHWInputDeviceHelper:Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;

    invoke-virtual {v0, p2}, Lcom/facebook/react/ReactAndroidHWInputDeviceHelper;->onFocusChanged(Landroid/view/View;)V

    .line 4
    invoke-super {p0, p1, p2}, Landroid/view/ViewGroup;->requestChildFocus(Landroid/view/View;Landroid/view/View;)V
    :try_end_17
    .catchall {:try_start_0 .. :try_end_17} :catchall_31

    .line 5
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_1e

    .line 6
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onRequestChildFocus(Lcom/facebook/react/ReactRootView;Landroid/view/View;Landroid/view/View;)V

    :cond_1e
    return-void

    :cond_1f
    :goto_1f
    :try_start_1f
    const-string v0, "ReactRootView"

    const-string v1, "Unable to handle child focus changed event as the catalyst instance has not been attached"

    .line 7
    invoke-static {v0, v1}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;)V

    .line 8
    invoke-super {p0, p1, p2}, Landroid/view/ViewGroup;->requestChildFocus(Landroid/view/View;Landroid/view/View;)V
    :try_end_29
    .catchall {:try_start_1f .. :try_end_29} :catchall_31

    .line 9
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_30

    .line 10
    invoke-interface {v0, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onRequestChildFocus(Lcom/facebook/react/ReactRootView;Landroid/view/View;Landroid/view/View;)V

    :cond_30
    return-void

    :catchall_31
    move-exception v0

    .line 11
    sget-object v1, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v1, :cond_39

    .line 12
    invoke-interface {v1, p0, p1, p2}, Lcom/facebook/react/ReactRootViewDelegate;->onRequestChildFocus(Lcom/facebook/react/ReactRootView;Landroid/view/View;Landroid/view/View;)V

    .line 13
    :cond_39
    throw v0
.end method

.method public requestDisallowInterceptTouchEvent(Z)V
    .registers 3

    .line 1
    invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_d

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    invoke-interface {v0, p1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V

    :cond_d
    return-void
.end method

.method public runApplication()V
    .registers 9

    .line 1
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_7

    .line 2
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onRunApplicationStart(Lcom/facebook/react/ReactRootView;)V

    :cond_7
    const-wide/16 v0, 0x0

    const-string v2, "ReactRootView.runApplication"

    .line 3
    invoke-static {v0, v1, v2}, Lcom/facebook/systrace/Systrace;->beginSection(JLjava/lang/String;)V

    .line 4
    :try_start_e
    iget-object v2, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v2, :cond_85

    iget-boolean v3, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-nez v3, :cond_17

    goto :goto_85

    .line 5
    :cond_17
    invoke-virtual {v2}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v2
    :try_end_1b
    .catchall {:try_start_e .. :try_end_1b} :catchall_90

    if-nez v2, :cond_28

    .line 6
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 7
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_27

    .line 8
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onRunApplicationEnd(Lcom/facebook/react/ReactRootView;)V

    :cond_27
    return-void

    .line 9
    :cond_28
    :try_start_28
    invoke-virtual {v2}, Lcom/facebook/react/bridge/ReactContext;->getCatalystInstance()Lcom/facebook/react/bridge/CatalystInstance;

    move-result-object v2

    .line 10
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getJSModuleName()Ljava/lang/String;

    move-result-object v3

    .line 11
    iget-boolean v4, p0, Lcom/facebook/react/ReactRootView;->mUseSurface:Z

    if-eqz v4, :cond_35

    goto :goto_7a

    .line 12
    :cond_35
    iget-boolean v4, p0, Lcom/facebook/react/ReactRootView;->mWasMeasured:Z

    if-eqz v4, :cond_40

    .line 13
    iget v4, p0, Lcom/facebook/react/ReactRootView;->mWidthMeasureSpec:I

    iget v5, p0, Lcom/facebook/react/ReactRootView;->mHeightMeasureSpec:I

    invoke-direct {p0, v4, v5}, Lcom/facebook/react/ReactRootView;->updateRootLayoutSpecs(II)V

    .line 14
    :cond_40
    new-instance v4, Lcom/facebook/react/bridge/WritableNativeMap;

    invoke-direct {v4}, Lcom/facebook/react/bridge/WritableNativeMap;-><init>()V

    const-string v5, "rootTag"

    .line 15
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getRootViewTag()I

    move-result v6

    int-to-double v6, v6

    invoke-virtual {v4, v5, v6, v7}, Lcom/facebook/react/bridge/WritableNativeMap;->putDouble(Ljava/lang/String;D)V

    .line 16
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getAppProperties()Landroid/os/Bundle;

    move-result-object v5

    if-eqz v5, :cond_5e

    const-string v6, "initialProps"

    .line 17
    invoke-static {v5}, Lcom/facebook/react/bridge/Arguments;->fromBundle(Landroid/os/Bundle;)Lcom/facebook/react/bridge/WritableMap;

    move-result-object v5

    invoke-virtual {v4, v6, v5}, Lcom/facebook/react/bridge/WritableNativeMap;->putMap(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V

    :cond_5e
    const/4 v5, 0x1

    .line 18
    iput-boolean v5, p0, Lcom/facebook/react/ReactRootView;->mShouldLogContentAppeared:Z

    const-string v5, "ReactRootView"

    const-string v6, "runApplication: call AppRegistry.runApplication"

    .line 19
    invoke-static {v5, v6}, Lcom/facebook/common/logging/FLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    const-string v5, "runApplication"

    const-string v6, "ReactNative"

    .line 20
    invoke-static {p0, v5, v6, v3}, Lcom/facebook/react/util/RNTracker;->start(Landroid/view/ViewGroup;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 21
    const-class v5, Lcom/facebook/react/modules/appregistry/AppRegistry;

    invoke-interface {v2, v5}, Lcom/facebook/react/bridge/CatalystInstance;->getJSModule(Ljava/lang/Class;)Lcom/facebook/react/bridge/JavaScriptModule;

    move-result-object v2

    check-cast v2, Lcom/facebook/react/modules/appregistry/AppRegistry;

    invoke-interface {v2, v3, v4}, Lcom/facebook/react/modules/appregistry/AppRegistry;->runApplication(Ljava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V
    :try_end_7a
    .catchall {:try_start_28 .. :try_end_7a} :catchall_90

    .line 22
    :goto_7a
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 23
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_84

    .line 24
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onRunApplicationEnd(Lcom/facebook/react/ReactRootView;)V

    :cond_84
    return-void

    .line 25
    :cond_85
    :goto_85
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 26
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_8f

    .line 27
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onRunApplicationEnd(Lcom/facebook/react/ReactRootView;)V

    :cond_8f
    return-void

    :catchall_90
    move-exception v2

    .line 28
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 29
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_9b

    .line 30
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onRunApplicationEnd(Lcom/facebook/react/ReactRootView;)V

    .line 31
    :cond_9b
    throw v2
.end method

.method public sendEvent(Ljava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V
    .registers 5

    .line 1
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-eqz v0, :cond_13

    .line 2
    invoke-virtual {v0}, Lcom/facebook/react/ReactInstanceManager;->getCurrentReactContext()Lcom/facebook/react/bridge/ReactContext;

    move-result-object v0

    const-class v1, Lcom/facebook/react/modules/core/DeviceEventManagerModule$RCTDeviceEventEmitter;

    .line 3
    invoke-virtual {v0, v1}, Lcom/facebook/react/bridge/ReactContext;->getJSModule(Ljava/lang/Class;)Lcom/facebook/react/bridge/JavaScriptModule;

    move-result-object v0

    check-cast v0, Lcom/facebook/react/modules/core/DeviceEventManagerModule$RCTDeviceEventEmitter;

    .line 4
    invoke-interface {v0, p1, p2}, Lcom/facebook/react/modules/core/DeviceEventManagerModule$RCTDeviceEventEmitter;->emit(Ljava/lang/String;Ljava/lang/Object;)V

    :cond_13
    return-void
.end method

.method public setAppProperties(Landroid/os/Bundle;)V
    .registers 2
    .annotation build Lcom/facebook/infer/annotation/ThreadConfined;
        value = "UI"
    .end annotation

    .line 1
    invoke-static {}, Lcom/facebook/react/bridge/UiThreadUtil;->assertOnUiThread()V

    .line 2
    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mAppProperties:Landroid/os/Bundle;

    .line 3
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->getRootViewTag()I

    move-result p1

    if-eqz p1, :cond_e

    .line 4
    invoke-virtual {p0}, Lcom/facebook/react/ReactRootView;->runApplication()V

    :cond_e
    return-void
.end method

.method public setEventListener(Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;)V
    .registers 2

    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mRootViewEventListener:Lcom/facebook/react/ReactRootView$ReactRootViewEventListener;

    return-void
.end method

.method public setIsFabric(Z)V
    .registers 2

    if-eqz p1, :cond_4

    const/4 p1, 0x2

    goto :goto_5

    :cond_4
    const/4 p1, 0x1

    :goto_5
    iput p1, p0, Lcom/facebook/react/ReactRootView;->mUIManagerType:I

    return-void
.end method

.method public setRootViewTag(I)V
    .registers 2

    iput p1, p0, Lcom/facebook/react/ReactRootView;->mRootViewTag:I

    return-void
.end method

.method public setShouldLogContentAppeared(Z)V
    .registers 2

    iput-boolean p1, p0, Lcom/facebook/react/ReactRootView;->mShouldLogContentAppeared:Z

    return-void
.end method

.method public simulateAttachForTesting()V
    .registers 2
    .annotation build Lcom/facebook/react/common/annotations/VisibleForTesting;
    .end annotation

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    .line 2
    new-instance v0, Lcom/facebook/react/uimanager/JSTouchDispatcher;

    invoke-direct {v0, p0}, Lcom/facebook/react/uimanager/JSTouchDispatcher;-><init>(Landroid/view/ViewGroup;)V

    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mJSTouchDispatcher:Lcom/facebook/react/uimanager/JSTouchDispatcher;

    return-void
.end method

.method public startReactApplication(Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;)V
    .registers 4

    const/4 v0, 0x0

    .line 1
    invoke-virtual {p0, p1, p2, v0}, Lcom/facebook/react/ReactRootView;->startReactApplication(Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Landroid/os/Bundle;)V

    return-void
.end method

.method public startReactApplication(Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Landroid/os/Bundle;)V
    .registers 5

    const/4 v0, 0x0

    .line 2
    invoke-virtual {p0, p1, p2, p3, v0}, Lcom/facebook/react/ReactRootView;->startReactApplication(Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Landroid/os/Bundle;Ljava/lang/String;)V

    return-void
.end method

.method public startReactApplication(Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Landroid/os/Bundle;Ljava/lang/String;)V
    .registers 9
    .annotation build Lcom/facebook/infer/annotation/ThreadConfined;
        value = "UI"
    .end annotation

    const-wide/16 v0, 0x0

    const-string v2, "startReactApplication"

    .line 3
    invoke-static {v0, v1, v2}, Lcom/facebook/systrace/Systrace;->beginSection(JLjava/lang/String;)V

    .line 4
    :try_start_7
    invoke-static {}, Lcom/facebook/react/bridge/UiThreadUtil;->assertOnUiThread()V

    .line 5
    iget-object v2, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    if-nez v2, :cond_10

    const/4 v2, 0x1

    goto :goto_11

    :cond_10
    const/4 v2, 0x0

    :goto_11
    const-string v3, "This root view has already been attached to a catalyst instance manager"

    invoke-static {v2, v3}, Lcom/facebook/infer/annotation/Assertions;->assertCondition(ZLjava/lang/String;)V

    .line 6
    iput-object p1, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    .line 7
    iput-object p2, p0, Lcom/facebook/react/ReactRootView;->mJSModuleName:Ljava/lang/String;

    .line 8
    iput-object p3, p0, Lcom/facebook/react/ReactRootView;->mAppProperties:Landroid/os/Bundle;

    .line 9
    iput-object p4, p0, Lcom/facebook/react/ReactRootView;->mInitialUITemplate:Ljava/lang/String;

    .line 10
    invoke-virtual {p1}, Lcom/facebook/react/ReactInstanceManager;->createReactContextInBackground()V

    .line 11
    invoke-direct {p0}, Lcom/facebook/react/ReactRootView;->attachToReactInstanceManager()V
    :try_end_24
    .catchall {:try_start_7 .. :try_end_24} :catchall_2f

    .line 12
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 13
    sget-object p3, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz p3, :cond_2e

    .line 14
    invoke-interface {p3, p0, p1, p2, p4}, Lcom/facebook/react/ReactRootViewDelegate;->onStartReactApplication(Lcom/facebook/react/ReactRootView;Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Ljava/lang/String;)V

    :cond_2e
    return-void

    :catchall_2f
    move-exception p3

    .line 15
    invoke-static {v0, v1}, Lcom/facebook/systrace/Systrace;->endSection(J)V

    .line 16
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_3a

    .line 17
    invoke-interface {v0, p0, p1, p2, p4}, Lcom/facebook/react/ReactRootViewDelegate;->onStartReactApplication(Lcom/facebook/react/ReactRootView;Lcom/facebook/react/ReactInstanceManager;Ljava/lang/String;Ljava/lang/String;)V

    .line 18
    :cond_3a
    throw p3
.end method

.method public unmountReactApplication()V
    .registers 4
    .annotation build Lcom/facebook/infer/annotation/ThreadConfined;
        value = "UI"
    .end annotation

    .line 1
    invoke-static {}, Lcom/facebook/react/bridge/UiThreadUtil;->assertOnUiThread()V

    .line 2
    iget-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    const/4 v1, 0x0

    if-eqz v0, :cond_11

    iget-boolean v2, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    if-eqz v2, :cond_11

    .line 3
    invoke-virtual {v0, p0}, Lcom/facebook/react/ReactInstanceManager;->detachRootView(Lcom/facebook/react/uimanager/ReactRoot;)V

    .line 4
    iput-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mIsAttachedToInstance:Z

    :cond_11
    const/4 v0, 0x0

    .line 5
    iput-object v0, p0, Lcom/facebook/react/ReactRootView;->mReactInstanceManager:Lcom/facebook/react/ReactInstanceManager;

    .line 6
    iput-boolean v1, p0, Lcom/facebook/react/ReactRootView;->mShouldLogContentAppeared:Z

    .line 7
    sget-object v0, Lcom/facebook/react/ReactRootView;->mReactRootViewDelegate:Lcom/facebook/react/ReactRootViewDelegate;

    if-eqz v0, :cond_1d

    .line 8
    invoke-interface {v0, p0}, Lcom/facebook/react/ReactRootViewDelegate;->onUnmountReactApplication(Lcom/facebook/react/ReactRootView;)V

    :cond_1d
    return-void
.end method