JSResponderHandler.smali
.class public Lcom/facebook/react/touch/JSResponderHandler;
.super Ljava/lang/Object;
.source "JSResponderHandler.java"
# interfaces
.implements Lcom/facebook/react/touch/OnInterceptTouchEventListener;
# static fields
.field public static final JS_RESPONDER_UNSET:I
# instance fields
.field public volatile mCurrentJSResponder:I
.field public mViewParentBlockingNativeResponder:Landroid/view/ViewParent;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
const v0, -0x5b
invoke-static {v0}, Lnp/NPFog;->d(I)I
move-result v0
sput v0, Lcom/facebook/react/touch/JSResponderHandler;->JS_RESPONDER_UNSET:I
return-void
.end method
.method public constructor <init>()V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lcom/facebook/react/touch/JSResponderHandler;->mCurrentJSResponder:I
return-void
.end method
.method private maybeUnblockNativeResponder()V
.registers 3
iget-object v0, p0, Lcom/facebook/react/touch/JSResponderHandler;->mViewParentBlockingNativeResponder:Landroid/view/ViewParent;
if-eqz v0, :cond_b
const/4 v1, 0x0
invoke-interface {v0, v1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
const/4 v0, 0x0
iput-object v0, p0, Lcom/facebook/react/touch/JSResponderHandler;->mViewParentBlockingNativeResponder:Landroid/view/ViewParent;
:cond_b
return-void
.end method
# virtual methods
.method public clearJSResponder()V
.registers 2
const/4 v0, -0x1
iput v0, p0, Lcom/facebook/react/touch/JSResponderHandler;->mCurrentJSResponder:I
invoke-direct {p0}, Lcom/facebook/react/touch/JSResponderHandler;->maybeUnblockNativeResponder()V
return-void
.end method
.method public onInterceptTouchEvent(Landroid/view/ViewGroup;Landroid/view/MotionEvent;)Z
.registers 6
iget v0, p0, Lcom/facebook/react/touch/JSResponderHandler;->mCurrentJSResponder:I
const/4 v1, 0x0
const/4 v2, -0x1
if-eq v0, v2, :cond_14
invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I
move-result p2
const/4 v2, 0x1
if-eq p2, v2, :cond_14
invoke-virtual {p1}, Landroid/view/ViewGroup;->getId()I
move-result p1
if-ne p1, v0, :cond_14
const/4 v1, 0x1
:cond_14
return v1
.end method
.method public setJSResponder(ILandroid/view/ViewParent;)V
.registers 3
.param p1 # I
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iput p1, p0, Lcom/facebook/react/touch/JSResponderHandler;->mCurrentJSResponder:I
invoke-direct {p0}, Lcom/facebook/react/touch/JSResponderHandler;->maybeUnblockNativeResponder()V
if-eqz p2, :cond_d
const/4 p1, 0x1
invoke-interface {p2, p1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
iput-object p2, p0, Lcom/facebook/react/touch/JSResponderHandler;->mViewParentBlockingNativeResponder:Landroid/view/ViewParent;
:cond_d
return-void
.end method