mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
944 lines
19 KiB
Smali
944 lines
19 KiB
Smali
.class public final Lcom/airbnb/lottie/utils/Utils;
|
|
.super Ljava/lang/Object;
|
|
.source "Utils.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final INV_SQRT_2:F
|
|
|
|
.field public static final SECOND_IN_NANOS:I = 0x3b9aca00
|
|
|
|
.field private static final threadLocalPathMeasure:Ljava/lang/ThreadLocal;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ThreadLocal<",
|
|
"Landroid/graphics/PathMeasure;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final threadLocalPoints:Ljava/lang/ThreadLocal;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ThreadLocal<",
|
|
"[F>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final threadLocalTempPath:Ljava/lang/ThreadLocal;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ThreadLocal<",
|
|
"Landroid/graphics/Path;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final threadLocalTempPath2:Ljava/lang/ThreadLocal;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ThreadLocal<",
|
|
"Landroid/graphics/Path;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 4
|
|
|
|
.line 40
|
|
new-instance v0, Lcom/airbnb/lottie/utils/Utils$1;
|
|
|
|
invoke-direct {v0}, Lcom/airbnb/lottie/utils/Utils$1;-><init>()V
|
|
|
|
sput-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalPathMeasure:Ljava/lang/ThreadLocal;
|
|
|
|
.line 47
|
|
new-instance v0, Lcom/airbnb/lottie/utils/Utils$2;
|
|
|
|
invoke-direct {v0}, Lcom/airbnb/lottie/utils/Utils$2;-><init>()V
|
|
|
|
sput-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalTempPath:Ljava/lang/ThreadLocal;
|
|
|
|
.line 54
|
|
new-instance v0, Lcom/airbnb/lottie/utils/Utils$3;
|
|
|
|
invoke-direct {v0}, Lcom/airbnb/lottie/utils/Utils$3;-><init>()V
|
|
|
|
sput-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalTempPath2:Ljava/lang/ThreadLocal;
|
|
|
|
.line 61
|
|
new-instance v0, Lcom/airbnb/lottie/utils/Utils$4;
|
|
|
|
invoke-direct {v0}, Lcom/airbnb/lottie/utils/Utils$4;-><init>()V
|
|
|
|
sput-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalPoints:Ljava/lang/ThreadLocal;
|
|
|
|
const-wide/high16 v0, 0x4000000000000000L # 2.0
|
|
|
|
.line 68
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
|
|
|
|
move-result-wide v2
|
|
|
|
div-double/2addr v2, v0
|
|
|
|
double-to-float v0, v2
|
|
|
|
sput v0, Lcom/airbnb/lottie/utils/Utils;->INV_SQRT_2:F
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 70
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static applyTrimPathIfNeeded(Landroid/graphics/Path;FFF)V
|
|
.locals 10
|
|
|
|
const-string v0, "applyTrimPathIfNeeded"
|
|
|
|
.line 139
|
|
invoke-static {v0}, Lcom/airbnb/lottie/L;->beginSection(Ljava/lang/String;)V
|
|
|
|
sget-object v1, Lcom/airbnb/lottie/utils/Utils;->threadLocalPathMeasure:Ljava/lang/ThreadLocal;
|
|
|
|
.line 140
|
|
invoke-virtual {v1}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/graphics/PathMeasure;
|
|
|
|
sget-object v2, Lcom/airbnb/lottie/utils/Utils;->threadLocalTempPath:Ljava/lang/ThreadLocal;
|
|
|
|
.line 141
|
|
invoke-virtual {v2}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/graphics/Path;
|
|
|
|
sget-object v3, Lcom/airbnb/lottie/utils/Utils;->threadLocalTempPath2:Ljava/lang/ThreadLocal;
|
|
|
|
.line 142
|
|
invoke-virtual {v3}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroid/graphics/Path;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 144
|
|
invoke-virtual {v1, p0, v4}, Landroid/graphics/PathMeasure;->setPath(Landroid/graphics/Path;Z)V
|
|
|
|
.line 146
|
|
invoke-virtual {v1}, Landroid/graphics/PathMeasure;->getLength()F
|
|
|
|
move-result v4
|
|
|
|
const/high16 v5, 0x3f800000 # 1.0f
|
|
|
|
cmpl-float v6, p1, v5
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
cmpl-float v6, p2, v7
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
.line 148
|
|
invoke-static {v0}, Lcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
cmpg-float v6, v4, v5
|
|
|
|
if-ltz v6, :cond_9
|
|
|
|
sub-float v6, p2, p1
|
|
|
|
sub-float/2addr v6, v5
|
|
|
|
.line 151
|
|
invoke-static {v6}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v5
|
|
|
|
float-to-double v5, v5
|
|
|
|
const-wide v8, 0x3f847ae147ae147bL # 0.01
|
|
|
|
cmpg-double v5, v5, v8
|
|
|
|
if-gez v5, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
mul-float/2addr p1, v4
|
|
|
|
mul-float/2addr p2, v4
|
|
|
|
.line 157
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->min(FF)F
|
|
|
|
move-result v5
|
|
|
|
.line 158
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->max(FF)F
|
|
|
|
move-result p1
|
|
|
|
mul-float/2addr p3, v4
|
|
|
|
add-float/2addr v5, p3
|
|
|
|
add-float/2addr p1, p3
|
|
|
|
cmpl-float p2, v5, v4
|
|
|
|
if-ltz p2, :cond_2
|
|
|
|
cmpl-float p2, p1, v4
|
|
|
|
if-ltz p2, :cond_2
|
|
|
|
.line 166
|
|
invoke-static {v5, v4}, Lcom/airbnb/lottie/utils/MiscUtils;->floorMod(FF)I
|
|
|
|
move-result p2
|
|
|
|
int-to-float v5, p2
|
|
|
|
.line 167
|
|
invoke-static {p1, v4}, Lcom/airbnb/lottie/utils/MiscUtils;->floorMod(FF)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
:cond_2
|
|
cmpg-float p2, v5, v7
|
|
|
|
if-gez p2, :cond_3
|
|
|
|
.line 171
|
|
invoke-static {v5, v4}, Lcom/airbnb/lottie/utils/MiscUtils;->floorMod(FF)I
|
|
|
|
move-result p2
|
|
|
|
int-to-float v5, p2
|
|
|
|
:cond_3
|
|
cmpg-float p2, p1, v7
|
|
|
|
if-gez p2, :cond_4
|
|
|
|
.line 174
|
|
invoke-static {p1, v4}, Lcom/airbnb/lottie/utils/MiscUtils;->floorMod(FF)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
:cond_4
|
|
cmpl-float p2, v5, p1
|
|
|
|
if-nez p2, :cond_5
|
|
|
|
.line 179
|
|
invoke-virtual {p0}, Landroid/graphics/Path;->reset()V
|
|
|
|
.line 180
|
|
invoke-static {v0}, Lcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
if-ltz p2, :cond_6
|
|
|
|
sub-float/2addr v5, v4
|
|
|
|
.line 188
|
|
:cond_6
|
|
invoke-virtual {v2}, Landroid/graphics/Path;->reset()V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
.line 189
|
|
invoke-virtual {v1, v5, p1, v2, p2}, Landroid/graphics/PathMeasure;->getSegment(FFLandroid/graphics/Path;Z)Z
|
|
|
|
cmpl-float p3, p1, v4
|
|
|
|
if-lez p3, :cond_7
|
|
|
|
.line 196
|
|
invoke-virtual {v3}, Landroid/graphics/Path;->reset()V
|
|
|
|
rem-float/2addr p1, v4
|
|
|
|
.line 197
|
|
invoke-virtual {v1, v7, p1, v3, p2}, Landroid/graphics/PathMeasure;->getSegment(FFLandroid/graphics/Path;Z)Z
|
|
|
|
.line 202
|
|
invoke-virtual {v2, v3}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_7
|
|
cmpg-float p1, v5, v7
|
|
|
|
if-gez p1, :cond_8
|
|
|
|
.line 204
|
|
invoke-virtual {v3}, Landroid/graphics/Path;->reset()V
|
|
|
|
add-float/2addr v5, v4
|
|
|
|
.line 205
|
|
invoke-virtual {v1, v5, v4, v3, p2}, Landroid/graphics/PathMeasure;->getSegment(FFLandroid/graphics/Path;Z)Z
|
|
|
|
.line 210
|
|
invoke-virtual {v2, v3}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;)V
|
|
|
|
.line 212
|
|
:cond_8
|
|
:goto_0
|
|
invoke-virtual {p0, v2}, Landroid/graphics/Path;->set(Landroid/graphics/Path;)V
|
|
|
|
.line 213
|
|
invoke-static {v0}, Lcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
|
|
|
|
return-void
|
|
|
|
.line 152
|
|
:cond_9
|
|
:goto_1
|
|
invoke-static {v0}, Lcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static applyTrimPathIfNeeded(Landroid/graphics/Path;Lcom/airbnb/lottie/animation/content/TrimPathContent;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 128
|
|
invoke-virtual {p1}, Lcom/airbnb/lottie/animation/content/TrimPathContent;->isHidden()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 131
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/airbnb/lottie/animation/content/TrimPathContent;->getStart()Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;
|
|
|
|
invoke-virtual {v0}, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;->getFloatValue()F
|
|
|
|
move-result v0
|
|
|
|
.line 132
|
|
invoke-virtual {p1}, Lcom/airbnb/lottie/animation/content/TrimPathContent;->getEnd()Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;
|
|
|
|
invoke-virtual {v1}, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;->getFloatValue()F
|
|
|
|
move-result v1
|
|
|
|
.line 133
|
|
invoke-virtual {p1}, Lcom/airbnb/lottie/animation/content/TrimPathContent;->getOffset()Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;
|
|
|
|
invoke-virtual {p1}, Lcom/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation;->getFloatValue()F
|
|
|
|
move-result p1
|
|
|
|
const/high16 v2, 0x42c80000 # 100.0f
|
|
|
|
div-float/2addr v0, v2
|
|
|
|
div-float/2addr v1, v2
|
|
|
|
const/high16 v2, 0x43b40000 # 360.0f
|
|
|
|
div-float/2addr p1, v2
|
|
|
|
.line 134
|
|
invoke-static {p0, v0, v1, p1}, Lcom/airbnb/lottie/utils/Utils;->applyTrimPathIfNeeded(Landroid/graphics/Path;FFF)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static closeQuietly(Ljava/io/Closeable;)V
|
|
.locals 0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 91
|
|
:try_start_0
|
|
invoke-interface {p0}, Ljava/io/Closeable;->close()V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 93
|
|
throw p0
|
|
|
|
:catch_1
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createPath(Landroid/graphics/PointF;Landroid/graphics/PointF;Landroid/graphics/PointF;Landroid/graphics/PointF;)Landroid/graphics/Path;
|
|
.locals 8
|
|
|
|
.line 74
|
|
new-instance v7, Landroid/graphics/Path;
|
|
|
|
invoke-direct {v7}, Landroid/graphics/Path;-><init>()V
|
|
|
|
.line 75
|
|
iget v0, p0, Landroid/graphics/PointF;->x:F
|
|
|
|
iget v1, p0, Landroid/graphics/PointF;->y:F
|
|
|
|
invoke-virtual {v7, v0, v1}, Landroid/graphics/Path;->moveTo(FF)V
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
.line 77
|
|
invoke-virtual {p2}, Landroid/graphics/PointF;->length()F
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
cmpl-float v0, v0, v1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p3}, Landroid/graphics/PointF;->length()F
|
|
|
|
move-result v0
|
|
|
|
cmpl-float v0, v0, v1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 78
|
|
:cond_0
|
|
iget v0, p0, Landroid/graphics/PointF;->x:F
|
|
|
|
iget v1, p2, Landroid/graphics/PointF;->x:F
|
|
|
|
add-float/2addr v1, v0
|
|
|
|
iget p0, p0, Landroid/graphics/PointF;->y:F
|
|
|
|
iget p2, p2, Landroid/graphics/PointF;->y:F
|
|
|
|
add-float v2, p0, p2
|
|
|
|
iget p0, p1, Landroid/graphics/PointF;->x:F
|
|
|
|
iget p2, p3, Landroid/graphics/PointF;->x:F
|
|
|
|
add-float v3, p0, p2
|
|
|
|
iget p0, p1, Landroid/graphics/PointF;->y:F
|
|
|
|
iget p2, p3, Landroid/graphics/PointF;->y:F
|
|
|
|
add-float v4, p0, p2
|
|
|
|
iget v5, p1, Landroid/graphics/PointF;->x:F
|
|
|
|
iget v6, p1, Landroid/graphics/PointF;->y:F
|
|
|
|
move-object v0, v7
|
|
|
|
invoke-virtual/range {v0 .. v6}, Landroid/graphics/Path;->cubicTo(FFFFFF)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 83
|
|
:cond_1
|
|
iget p0, p1, Landroid/graphics/PointF;->x:F
|
|
|
|
iget p1, p1, Landroid/graphics/PointF;->y:F
|
|
|
|
invoke-virtual {v7, p0, p1}, Landroid/graphics/Path;->lineTo(FF)V
|
|
|
|
:goto_0
|
|
return-object v7
|
|
.end method
|
|
|
|
.method public static dpScale()F
|
|
.locals 1
|
|
|
|
.line 252
|
|
invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v0
|
|
|
|
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static getAnimationScale(Landroid/content/Context;)F
|
|
.locals 2
|
|
|
|
.line 257
|
|
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "animator_duration_scale"
|
|
|
|
const/high16 v1, 0x3f800000 # 1.0f
|
|
|
|
invoke-static {p0, v0, v1}, Landroid/provider/Settings$Global;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static getScale(Landroid/graphics/Matrix;)F
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalPoints:Ljava/lang/ThreadLocal;
|
|
|
|
.line 101
|
|
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [F
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 103
|
|
aput v2, v0, v1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 104
|
|
aput v2, v0, v3
|
|
|
|
sget v2, Lcom/airbnb/lottie/utils/Utils;->INV_SQRT_2:F
|
|
|
|
const/4 v4, 0x2
|
|
|
|
.line 106
|
|
aput v2, v0, v4
|
|
|
|
const/4 v5, 0x3
|
|
|
|
.line 107
|
|
aput v2, v0, v5
|
|
|
|
.line 108
|
|
invoke-virtual {p0, v0}, Landroid/graphics/Matrix;->mapPoints([F)V
|
|
|
|
.line 109
|
|
aget p0, v0, v4
|
|
|
|
aget v1, v0, v1
|
|
|
|
sub-float/2addr p0, v1
|
|
|
|
.line 110
|
|
aget v1, v0, v5
|
|
|
|
aget v0, v0, v3
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
float-to-double v2, p0
|
|
|
|
float-to-double v0, v1
|
|
|
|
.line 112
|
|
invoke-static {v2, v3, v0, v1}, Ljava/lang/Math;->hypot(DD)D
|
|
|
|
move-result-wide v0
|
|
|
|
double-to-float p0, v0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static hasZeroScaleAxis(Landroid/graphics/Matrix;)Z
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/airbnb/lottie/utils/Utils;->threadLocalPoints:Ljava/lang/ThreadLocal;
|
|
|
|
.line 116
|
|
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [F
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 118
|
|
aput v2, v0, v1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 119
|
|
aput v2, v0, v3
|
|
|
|
const v2, 0x471212bb
|
|
|
|
const/4 v4, 0x2
|
|
|
|
.line 121
|
|
aput v2, v0, v4
|
|
|
|
const v2, 0x471a973c
|
|
|
|
const/4 v5, 0x3
|
|
|
|
.line 122
|
|
aput v2, v0, v5
|
|
|
|
.line 123
|
|
invoke-virtual {p0, v0}, Landroid/graphics/Matrix;->mapPoints([F)V
|
|
|
|
.line 124
|
|
aget p0, v0, v1
|
|
|
|
aget v2, v0, v4
|
|
|
|
cmpl-float p0, p0, v2
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
aget p0, v0, v3
|
|
|
|
aget v0, v0, v5
|
|
|
|
cmpl-float p0, p0, v0
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
:cond_0
|
|
move v1, v3
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public static hashFor(FFFF)I
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
cmpl-float v1, p0, v0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/16 v1, 0x20f
|
|
|
|
int-to-float v1, v1
|
|
|
|
mul-float/2addr v1, p0
|
|
|
|
float-to-int p0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p0, 0x11
|
|
|
|
:goto_0
|
|
cmpl-float v1, p1, v0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
mul-int/lit8 p0, p0, 0x1f
|
|
|
|
int-to-float p0, p0
|
|
|
|
mul-float/2addr p0, p1
|
|
|
|
float-to-int p0, p0
|
|
|
|
:cond_1
|
|
cmpl-float p1, p2, v0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
mul-int/lit8 p0, p0, 0x1f
|
|
|
|
int-to-float p0, p0
|
|
|
|
mul-float/2addr p0, p2
|
|
|
|
float-to-int p0, p0
|
|
|
|
:cond_2
|
|
cmpl-float p1, p3, v0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
mul-int/lit8 p0, p0, 0x1f
|
|
|
|
int-to-float p0, p0
|
|
|
|
mul-float/2addr p0, p3
|
|
|
|
float-to-int p0, p0
|
|
|
|
:cond_3
|
|
return p0
|
|
.end method
|
|
|
|
.method public static isAtLeastVersion(IIIIII)Z
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-ge p0, p3, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
if-le p0, p3, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
if-ge p1, p4, :cond_2
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
if-le p1, p4, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
if-lt p2, p5, :cond_4
|
|
|
|
move v0, v1
|
|
|
|
:cond_4
|
|
return v0
|
|
.end method
|
|
|
|
.method public static isNetworkException(Ljava/lang/Throwable;)Z
|
|
.locals 1
|
|
|
|
.line 283
|
|
instance-of v0, p0, Ljava/net/SocketException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/nio/channels/ClosedChannelException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/io/InterruptedIOException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/net/ProtocolException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljavax/net/ssl/SSLException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/net/UnknownHostException;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of p0, p0, Ljava/net/UnknownServiceException;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static renderPath(Landroid/graphics/Path;)Landroid/graphics/Bitmap;
|
|
.locals 4
|
|
|
|
.line 310
|
|
new-instance v0, Landroid/graphics/RectF;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 311
|
|
invoke-virtual {p0, v0, v1}, Landroid/graphics/Path;->computeBounds(Landroid/graphics/RectF;Z)V
|
|
|
|
.line 312
|
|
iget v1, v0, Landroid/graphics/RectF;->right:F
|
|
|
|
float-to-int v1, v1
|
|
|
|
iget v0, v0, Landroid/graphics/RectF;->bottom:F
|
|
|
|
float-to-int v0, v0
|
|
|
|
sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {v1, v0, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v0
|
|
|
|
.line 313
|
|
new-instance v1, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
.line 314
|
|
new-instance v2, Lcom/airbnb/lottie/animation/LPaint;
|
|
|
|
invoke-direct {v2}, Lcom/airbnb/lottie/animation/LPaint;-><init>()V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 315
|
|
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setAntiAlias(Z)V
|
|
|
|
const v3, -0xffff01
|
|
|
|
.line 316
|
|
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
.line 317
|
|
invoke-virtual {v1, p0, v2}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static resizeBitmapIfNeeded(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;
|
|
.locals 1
|
|
|
|
.line 271
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, p2, :cond_0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 274
|
|
invoke-static {p0, p1, p2, v0}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
.line 275
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static saveLayerCompat(Landroid/graphics/Canvas;Landroid/graphics/RectF;Landroid/graphics/Paint;)V
|
|
.locals 1
|
|
|
|
const/16 v0, 0x1f
|
|
|
|
.line 290
|
|
invoke-static {p0, p1, p2, v0}, Lcom/airbnb/lottie/utils/Utils;->saveLayerCompat(Landroid/graphics/Canvas;Landroid/graphics/RectF;Landroid/graphics/Paint;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static saveLayerCompat(Landroid/graphics/Canvas;Landroid/graphics/RectF;Landroid/graphics/Paint;I)V
|
|
.locals 0
|
|
|
|
const-string p3, "Utils#saveLayer"
|
|
|
|
.line 294
|
|
invoke-static {p3}, Lcom/airbnb/lottie/L;->beginSection(Ljava/lang/String;)V
|
|
|
|
.line 300
|
|
invoke-virtual {p0, p1, p2}, Landroid/graphics/Canvas;->saveLayer(Landroid/graphics/RectF;Landroid/graphics/Paint;)I
|
|
|
|
.line 302
|
|
invoke-static {p3}, Lcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
|
|
|
|
return-void
|
|
.end method
|