ValueAnimatedNode.smali
.class public Lcom/facebook/react/animated/ValueAnimatedNode;
.super Lcom/facebook/react/animated/AnimatedNode;
.source "ValueAnimatedNode.java"
# instance fields
.field public mAnimatedObject:Ljava/lang/Object;
.field public mOffset:D
.field public mValue:D
.field public mValueListener:Lcom/facebook/react/animated/AnimatedNodeValueListener;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 3
invoke-direct {p0}, Lcom/facebook/react/animated/AnimatedNode;-><init>()V
const/4 v0, 0x0
iput-object v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mAnimatedObject:Ljava/lang/Object;
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
return-void
.end method
.method public constructor <init>(Lcom/facebook/react/bridge/ReadableMap;)V
.registers 4
invoke-direct {p0}, Lcom/facebook/react/animated/AnimatedNode;-><init>()V
const/4 v0, 0x0
iput-object v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mAnimatedObject:Ljava/lang/Object;
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
const-string/jumbo v0, "value"
invoke-interface {p1, v0}, Lcom/facebook/react/bridge/ReadableMap;->getDouble(Ljava/lang/String;)D
move-result-wide v0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
const-string v0, "offset"
invoke-interface {p1, v0}, Lcom/facebook/react/bridge/ReadableMap;->getDouble(Ljava/lang/String;)D
move-result-wide v0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
return-void
.end method
# virtual methods
.method public extractOffset()V
.registers 5
iget-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
iget-wide v2, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
add-double/2addr v0, v2
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
return-void
.end method
.method public flattenOffset()V
.registers 5
iget-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
iget-wide v2, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
add-double/2addr v0, v2
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
return-void
.end method
.method public getAnimatedObject()Ljava/lang/Object;
.registers 2
iget-object v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mAnimatedObject:Ljava/lang/Object;
return-object v0
.end method
.method public getValue()D
.registers 5
iget-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
iget-wide v2, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
add-double/2addr v0, v2
invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_e
invoke-virtual {p0}, Lcom/facebook/react/animated/AnimatedNode;->update()V
:cond_e
iget-wide v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mOffset:D
iget-wide v2, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValue:D
add-double/2addr v0, v2
return-wide v0
.end method
.method public onValueUpdate()V
.registers 4
iget-object v0, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValueListener:Lcom/facebook/react/animated/AnimatedNodeValueListener;
if-nez v0, :cond_5
return-void
:cond_5
invoke-virtual {p0}, Lcom/facebook/react/animated/ValueAnimatedNode;->getValue()D
move-result-wide v1
invoke-interface {v0, v1, v2}, Lcom/facebook/react/animated/AnimatedNodeValueListener;->onValueUpdate(D)V
return-void
.end method
.method public setValueListener(Lcom/facebook/react/animated/AnimatedNodeValueListener;)V
.registers 2
.param p1 # Lcom/facebook/react/animated/AnimatedNodeValueListener;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iput-object p1, p0, Lcom/facebook/react/animated/ValueAnimatedNode;->mValueListener:Lcom/facebook/react/animated/AnimatedNodeValueListener;
return-void
.end method