Rabbit-R1/original r1/smali/smali_classes2/androidx/transition/Explode.smali
2024-05-21 17:08:36 -04:00

607 lines
13 KiB
Smali

.class public Landroidx/transition/Explode;
.super Landroidx/transition/Visibility;
.source "Explode.java"
# static fields
.field private static final PROPNAME_SCREEN_BOUNDS:Ljava/lang/String; = "android:explode:screenBounds"
.field private static final sAccelerate:Landroid/animation/TimeInterpolator;
.field private static final sDecelerate:Landroid/animation/TimeInterpolator;
# instance fields
.field private mTempLoc:[I
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 45
new-instance v0, Landroid/view/animation/DecelerateInterpolator;
invoke-direct {v0}, Landroid/view/animation/DecelerateInterpolator;-><init>()V
sput-object v0, Landroidx/transition/Explode;->sDecelerate:Landroid/animation/TimeInterpolator;
.line 46
new-instance v0, Landroid/view/animation/AccelerateInterpolator;
invoke-direct {v0}, Landroid/view/animation/AccelerateInterpolator;-><init>()V
sput-object v0, Landroidx/transition/Explode;->sAccelerate:Landroid/animation/TimeInterpolator;
return-void
.end method
.method public constructor <init>()V
.locals 1
.line 51
invoke-direct {p0}, Landroidx/transition/Visibility;-><init>()V
const/4 v0, 0x2
new-array v0, v0, [I
iput-object v0, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 52
new-instance v0, Landroidx/transition/CircularPropagation;
invoke-direct {v0}, Landroidx/transition/CircularPropagation;-><init>()V
invoke-virtual {p0, v0}, Landroidx/transition/Explode;->setPropagation(Landroidx/transition/TransitionPropagation;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 0
.line 56
invoke-direct {p0, p1, p2}, Landroidx/transition/Visibility;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 p1, 0x2
new-array p1, p1, [I
iput-object p1, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 57
new-instance p1, Landroidx/transition/CircularPropagation;
invoke-direct {p1}, Landroidx/transition/CircularPropagation;-><init>()V
invoke-virtual {p0, p1}, Landroidx/transition/Explode;->setPropagation(Landroidx/transition/TransitionPropagation;)V
return-void
.end method
.method private static calculateDistance(FF)F
.locals 0
mul-float/2addr p0, p0
mul-float/2addr p1, p1
add-float/2addr p0, p1
float-to-double p0, p0
.line 176
invoke-static {p0, p1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide p0
double-to-float p0, p0
return p0
.end method
.method private static calculateMaxDistance(Landroid/view/View;II)F
.locals 1
.line 170
invoke-virtual {p0}, Landroid/view/View;->getWidth()I
move-result v0
sub-int/2addr v0, p1
invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I
move-result p1
.line 171
invoke-virtual {p0}, Landroid/view/View;->getHeight()I
move-result p0
sub-int/2addr p0, p2
invoke-static {p2, p0}, Ljava/lang/Math;->max(II)I
move-result p0
int-to-float p1, p1
int-to-float p0, p0
.line 172
invoke-static {p1, p0}, Landroidx/transition/Explode;->calculateDistance(FF)F
move-result p0
return p0
.end method
.method private calculateOut(Landroid/view/View;Landroid/graphics/Rect;[I)V
.locals 12
iget-object v0, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 131
invoke-virtual {p1, v0}, Landroid/view/View;->getLocationOnScreen([I)V
iget-object v0, p0, Landroidx/transition/Explode;->mTempLoc:[I
const/4 v1, 0x0
.line 132
aget v2, v0, v1
const/4 v3, 0x1
.line 133
aget v0, v0, v3
.line 137
invoke-virtual {p0}, Landroidx/transition/Explode;->getEpicenter()Landroid/graphics/Rect;
move-result-object p0
if-nez p0, :cond_0
.line 139
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
move-result p0
div-int/lit8 p0, p0, 0x2
add-int/2addr p0, v2
.line 140
invoke-virtual {p1}, Landroid/view/View;->getTranslationX()F
move-result v4
invoke-static {v4}, Ljava/lang/Math;->round(F)I
move-result v4
add-int/2addr p0, v4
.line 141
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
move-result v4
div-int/lit8 v4, v4, 0x2
add-int/2addr v4, v0
.line 142
invoke-virtual {p1}, Landroid/view/View;->getTranslationY()F
move-result v5
invoke-static {v5}, Ljava/lang/Math;->round(F)I
move-result v5
add-int/2addr v4, v5
goto :goto_0
.line 144
:cond_0
invoke-virtual {p0}, Landroid/graphics/Rect;->centerX()I
move-result v4
.line 145
invoke-virtual {p0}, Landroid/graphics/Rect;->centerY()I
move-result p0
move v11, v4
move v4, p0
move p0, v11
.line 148
:goto_0
invoke-virtual {p2}, Landroid/graphics/Rect;->centerX()I
move-result v5
.line 149
invoke-virtual {p2}, Landroid/graphics/Rect;->centerY()I
move-result p2
sub-int/2addr v5, p0
int-to-float v5, v5
sub-int/2addr p2, v4
int-to-float p2, p2
const/4 v6, 0x0
cmpl-float v7, v5, v6
if-nez v7, :cond_1
cmpl-float v6, p2, v6
if-nez v6, :cond_1
.line 155
invoke-static {}, Ljava/lang/Math;->random()D
move-result-wide v5
const-wide/high16 v7, 0x4000000000000000L # 2.0
mul-double/2addr v5, v7
double-to-float p2, v5
const/high16 v5, 0x3f800000 # 1.0f
sub-float/2addr p2, v5
.line 156
invoke-static {}, Ljava/lang/Math;->random()D
move-result-wide v9
mul-double/2addr v9, v7
double-to-float v6, v9
sub-float v5, v6, v5
move v11, v5
move v5, p2
move p2, v11
.line 158
:cond_1
invoke-static {v5, p2}, Landroidx/transition/Explode;->calculateDistance(FF)F
move-result v6
div-float/2addr v5, v6
div-float/2addr p2, v6
sub-int/2addr p0, v2
sub-int/2addr v4, v0
.line 163
invoke-static {p1, p0, v4}, Landroidx/transition/Explode;->calculateMaxDistance(Landroid/view/View;II)F
move-result p0
mul-float/2addr v5, p0
.line 165
invoke-static {v5}, Ljava/lang/Math;->round(F)I
move-result p1
aput p1, p3, v1
mul-float/2addr p0, p2
.line 166
invoke-static {p0}, Ljava/lang/Math;->round(F)I
move-result p0
aput p0, p3, v3
return-void
.end method
.method private captureValues(Landroidx/transition/TransitionValues;)V
.locals 4
.line 61
iget-object v0, p1, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
iget-object v1, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 62
invoke-virtual {v0, v1}, Landroid/view/View;->getLocationOnScreen([I)V
iget-object p0, p0, Landroidx/transition/Explode;->mTempLoc:[I
const/4 v1, 0x0
.line 63
aget v1, p0, v1
const/4 v2, 0x1
.line 64
aget p0, p0, v2
.line 65
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
move-result v2
add-int/2addr v2, v1
.line 66
invoke-virtual {v0}, Landroid/view/View;->getHeight()I
move-result v0
add-int/2addr v0, p0
.line 67
iget-object p1, p1, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
new-instance v3, Landroid/graphics/Rect;
invoke-direct {v3, v1, p0, v2, v0}, Landroid/graphics/Rect;-><init>(IIII)V
const-string p0, "android:explode:screenBounds"
invoke-interface {p1, p0, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public captureEndValues(Landroidx/transition/TransitionValues;)V
.locals 0
.line 78
invoke-super {p0, p1}, Landroidx/transition/Visibility;->captureEndValues(Landroidx/transition/TransitionValues;)V
.line 79
invoke-direct {p0, p1}, Landroidx/transition/Explode;->captureValues(Landroidx/transition/TransitionValues;)V
return-void
.end method
.method public captureStartValues(Landroidx/transition/TransitionValues;)V
.locals 0
.line 72
invoke-super {p0, p1}, Landroidx/transition/Visibility;->captureStartValues(Landroidx/transition/TransitionValues;)V
.line 73
invoke-direct {p0, p1}, Landroidx/transition/Explode;->captureValues(Landroidx/transition/TransitionValues;)V
return-void
.end method
.method public onAppear(Landroid/view/ViewGroup;Landroid/view/View;Landroidx/transition/TransitionValues;Landroidx/transition/TransitionValues;)Landroid/animation/Animator;
.locals 10
if-nez p4, :cond_0
const/4 p0, 0x0
return-object p0
.line 89
:cond_0
iget-object p3, p4, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
const-string v0, "android:explode:screenBounds"
invoke-interface {p3, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
check-cast p3, Landroid/graphics/Rect;
.line 90
invoke-virtual {p2}, Landroid/view/View;->getTranslationX()F
move-result v6
.line 91
invoke-virtual {p2}, Landroid/view/View;->getTranslationY()F
move-result v7
iget-object v0, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 92
invoke-direct {p0, p1, p3, v0}, Landroidx/transition/Explode;->calculateOut(Landroid/view/View;Landroid/graphics/Rect;[I)V
iget-object p1, p0, Landroidx/transition/Explode;->mTempLoc:[I
const/4 v0, 0x0
.line 93
aget v0, p1, v0
int-to-float v0, v0
add-float v4, v6, v0
const/4 v0, 0x1
.line 94
aget p1, p1, v0
int-to-float p1, p1
add-float v5, v7, p1
.line 96
iget v2, p3, Landroid/graphics/Rect;->left:I
iget v3, p3, Landroid/graphics/Rect;->top:I
sget-object v8, Landroidx/transition/Explode;->sDecelerate:Landroid/animation/TimeInterpolator;
move-object v0, p2
move-object v1, p4
move-object v9, p0
invoke-static/range {v0 .. v9}, Landroidx/transition/TranslationAnimationCreator;->createAnimation(Landroid/view/View;Landroidx/transition/TransitionValues;IIFFFFLandroid/animation/TimeInterpolator;Landroidx/transition/Transition;)Landroid/animation/Animator;
move-result-object p0
return-object p0
.end method
.method public onDisappear(Landroid/view/ViewGroup;Landroid/view/View;Landroidx/transition/TransitionValues;Landroidx/transition/TransitionValues;)Landroid/animation/Animator;
.locals 10
if-nez p3, :cond_0
const/4 p0, 0x0
return-object p0
.line 107
:cond_0
iget-object p4, p3, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
const-string v0, "android:explode:screenBounds"
invoke-interface {p4, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p4
check-cast p4, Landroid/graphics/Rect;
.line 108
iget v2, p4, Landroid/graphics/Rect;->left:I
.line 109
iget v3, p4, Landroid/graphics/Rect;->top:I
.line 110
invoke-virtual {p2}, Landroid/view/View;->getTranslationX()F
move-result v4
.line 111
invoke-virtual {p2}, Landroid/view/View;->getTranslationY()F
move-result v5
.line 114
iget-object v0, p3, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
sget v1, Landroidx/transition/R$id;->transition_position:I
invoke-virtual {v0, v1}, Landroid/view/View;->getTag(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, [I
const/4 v1, 0x1
const/4 v6, 0x0
if-eqz v0, :cond_1
.line 118
aget v7, v0, v6
iget v8, p4, Landroid/graphics/Rect;->left:I
sub-int/2addr v7, v8
int-to-float v7, v7
add-float/2addr v7, v4
.line 119
aget v8, v0, v1
iget v9, p4, Landroid/graphics/Rect;->top:I
sub-int/2addr v8, v9
int-to-float v8, v8
add-float/2addr v8, v5
.line 120
aget v9, v0, v6
aget v0, v0, v1
invoke-virtual {p4, v9, v0}, Landroid/graphics/Rect;->offsetTo(II)V
goto :goto_0
:cond_1
move v7, v4
move v8, v5
:goto_0
iget-object v0, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 122
invoke-direct {p0, p1, p4, v0}, Landroidx/transition/Explode;->calculateOut(Landroid/view/View;Landroid/graphics/Rect;[I)V
iget-object p1, p0, Landroidx/transition/Explode;->mTempLoc:[I
.line 123
aget p4, p1, v6
int-to-float p4, p4
add-float v6, v7, p4
.line 124
aget p1, p1, v1
int-to-float p1, p1
add-float v7, v8, p1
sget-object v8, Landroidx/transition/Explode;->sAccelerate:Landroid/animation/TimeInterpolator;
move-object v0, p2
move-object v1, p3
move-object v9, p0
.line 126
invoke-static/range {v0 .. v9}, Landroidx/transition/TranslationAnimationCreator;->createAnimation(Landroid/view/View;Landroidx/transition/TransitionValues;IIFFFFLandroid/animation/TimeInterpolator;Landroidx/transition/Transition;)Landroid/animation/Animator;
move-result-object p0
return-object p0
.end method