ReactCheckBoxManager$1.smali
.class Lcom/facebook/react/views/checkbox/ReactCheckBoxManager$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroid/widget/CompoundButton$OnCheckedChangeListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/facebook/react/views/checkbox/ReactCheckBoxManager;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private getReactContext(Landroid/widget/CompoundButton;)Lcom/facebook/react/bridge/ReactContext;
.registers 4
.line 1
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
.line 2
instance-of v1, v0, Landroidx/appcompat/widget/n0;
if-eqz v1, :cond_11
.line 3
check-cast v0, Landroidx/appcompat/widget/n0;
invoke-virtual {v0}, Landroid/content/ContextWrapper;->getBaseContext()Landroid/content/Context;
move-result-object p1
check-cast p1, Lcom/facebook/react/bridge/ReactContext;
goto :goto_17
.line 4
:cond_11
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object p1
check-cast p1, Lcom/facebook/react/bridge/ReactContext;
:goto_17
return-object p1
.end method
# virtual methods
.method public onCheckedChanged(Landroid/widget/CompoundButton;Z)V
.registers 5
.line 1
invoke-direct {p0, p1}, Lcom/facebook/react/views/checkbox/ReactCheckBoxManager$1;->getReactContext(Landroid/widget/CompoundButton;)Lcom/facebook/react/bridge/ReactContext;
move-result-object v0
.line 2
const-class v1, Lcom/facebook/react/uimanager/UIManagerModule;
.line 3
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;
.line 4
invoke-virtual {v0}, Lcom/facebook/react/uimanager/UIManagerModule;->getEventDispatcher()Lcom/facebook/react/uimanager/events/EventDispatcher;
move-result-object v0
new-instance v1, Lcom/facebook/react/views/checkbox/ReactCheckBoxEvent;
.line 5
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result p1
invoke-direct {v1, p1, p2}, Lcom/facebook/react/views/checkbox/ReactCheckBoxEvent;-><init>(IZ)V
invoke-virtual {v0, v1}, Lcom/facebook/react/uimanager/events/EventDispatcher;->dispatchEvent(Lcom/facebook/react/uimanager/events/Event;)V
return-void
.end method