apkfuckery/com.discord/smali/androidx/dynamicanimation/animation/FlingAnimation.smali
2019-08-30 22:04:20 +02:00

301 lines
9.5 KiB
Smali

.class public final Landroidx/dynamicanimation/animation/FlingAnimation;
.super Landroidx/dynamicanimation/animation/DynamicAnimation;
.source "FlingAnimation.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/dynamicanimation/animation/DynamicAnimation<",
"Landroidx/dynamicanimation/animation/FlingAnimation;",
">;"
}
.end annotation
# instance fields
.field private final mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
# direct methods
.method public constructor <init>(Landroidx/dynamicanimation/animation/FloatValueHolder;)V
.locals 1
invoke-direct {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;-><init>(Landroidx/dynamicanimation/animation/FloatValueHolder;)V
new-instance p1, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-direct {p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;-><init>()V
iput-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
iget-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {p0}, Landroidx/dynamicanimation/animation/FlingAnimation;->getValueThreshold()F
move-result v0
invoke-virtual {p1, v0}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Object;Landroidx/dynamicanimation/animation/FloatPropertyCompat;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
">(TK;",
"Landroidx/dynamicanimation/animation/FloatPropertyCompat<",
"TK;>;)V"
}
.end annotation
invoke-direct {p0, p1, p2}, Landroidx/dynamicanimation/animation/DynamicAnimation;-><init>(Ljava/lang/Object;Landroidx/dynamicanimation/animation/FloatPropertyCompat;)V
new-instance p1, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-direct {p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;-><init>()V
iput-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
iget-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {p0}, Landroidx/dynamicanimation/animation/FlingAnimation;->getValueThreshold()F
move-result p2
invoke-virtual {p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
return-void
.end method
# virtual methods
.method final getAcceleration(FF)F
.locals 1
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {v0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->getAcceleration(FF)F
move-result p1
return p1
.end method
.method public final getFriction()F
.locals 1
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {v0}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->getFrictionScalar()F
move-result v0
return v0
.end method
.method final isAtEquilibrium(FF)Z
.locals 1
iget v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMaxValue:F
cmpl-float v0, p1, v0
if-gez v0, :cond_1
iget v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMinValue:F
cmpg-float v0, p1, v0
if-lez v0, :cond_1
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {v0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->isAtEquilibrium(FF)Z
move-result p1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
const/4 p1, 0x0
return p1
:cond_1
:goto_0
const/4 p1, 0x1
return p1
.end method
.method public final setFriction(F)Landroidx/dynamicanimation/animation/FlingAnimation;
.locals 1
const/4 v0, 0x0
cmpg-float v0, p1, v0
if-lez v0, :cond_0
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {v0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setFrictionScalar(F)V
return-object p0
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Friction must be positive"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final bridge synthetic setMaxValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
.locals 0
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setMaxValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
move-result-object p1
return-object p1
.end method
.method public final setMaxValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
.locals 0
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setMaxValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
return-object p0
.end method
.method public final bridge synthetic setMinValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
.locals 0
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setMinValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
move-result-object p1
return-object p1
.end method
.method public final setMinValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
.locals 0
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setMinValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
return-object p0
.end method
.method public final bridge synthetic setStartVelocity(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
.locals 0
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setStartVelocity(F)Landroidx/dynamicanimation/animation/FlingAnimation;
move-result-object p1
return-object p1
.end method
.method public final setStartVelocity(F)Landroidx/dynamicanimation/animation/FlingAnimation;
.locals 0
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setStartVelocity(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
return-object p0
.end method
.method final setValueThreshold(F)V
.locals 1
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
invoke-virtual {v0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
return-void
.end method
.method final updateValueAndVelocity(J)Z
.locals 3
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
iget v1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
iget v2, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mVelocity:F
invoke-virtual {v0, v1, v2, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->updateValueAndVelocity(FFJ)Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;
move-result-object p1
iget p2, p1, Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;->mValue:F
iput p2, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
iget p1, p1, Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;->mVelocity:F
iput p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mVelocity:F
iget p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
iget p2, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMinValue:F
const/4 v0, 0x1
cmpg-float p1, p1, p2
if-gez p1, :cond_0
iget p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMinValue:F
iput p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
return v0
:cond_0
iget p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
iget p2, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMaxValue:F
cmpl-float p1, p1, p2
if-lez p1, :cond_1
iget p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mMaxValue:F
iput p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
return v0
:cond_1
iget p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mValue:F
iget p2, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mVelocity:F
invoke-virtual {p0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation;->isAtEquilibrium(FF)Z
move-result p1
if-eqz p1, :cond_2
return v0
:cond_2
const/4 p1, 0x0
return p1
.end method