apkfuckery/com.discord/smali/androidx/transition/ChangeClipBounds.smali
2019-07-24 13:27:29 +02:00

287 lines
7.4 KiB
Smali

.class public Landroidx/transition/ChangeClipBounds;
.super Landroidx/transition/Transition;
.source "ChangeClipBounds.java"
# static fields
.field private static final PROPNAME_BOUNDS:Ljava/lang/String; = "android:clipBounds:bounds"
.field private static final PROPNAME_CLIP:Ljava/lang/String; = "android:clipBounds:clip"
.field private static final sTransitionProperties:[Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 3
const/4 v0, 0x1
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "android:clipBounds:clip"
aput-object v2, v0, v1
sput-object v0, Landroidx/transition/ChangeClipBounds;->sTransitionProperties:[Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Landroidx/transition/Transition;-><init>()V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 0
invoke-direct {p0, p1, p2}, Landroidx/transition/Transition;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method private captureValues(Landroidx/transition/TransitionValues;)V
.locals 4
iget-object v0, p1, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getVisibility()I
move-result v1
const/16 v2, 0x8
if-ne v1, v2, :cond_0
return-void
:cond_0
invoke-static {v0}, Landroidx/core/view/ViewCompat;->getClipBounds(Landroid/view/View;)Landroid/graphics/Rect;
move-result-object v1
iget-object v2, p1, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
const-string v3, "android:clipBounds:clip"
invoke-interface {v2, v3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
if-nez v1, :cond_1
new-instance v1, Landroid/graphics/Rect;
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
move-result v2
invoke-virtual {v0}, Landroid/view/View;->getHeight()I
move-result v0
const/4 v3, 0x0
invoke-direct {v1, v3, v3, v2, v0}, Landroid/graphics/Rect;-><init>(IIII)V
iget-object p1, p1, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
const-string v0, "android:clipBounds:bounds"
invoke-interface {p1, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_1
return-void
.end method
# virtual methods
.method public captureEndValues(Landroidx/transition/TransitionValues;)V
.locals 0
.param p1 # Landroidx/transition/TransitionValues;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0, p1}, Landroidx/transition/ChangeClipBounds;->captureValues(Landroidx/transition/TransitionValues;)V
return-void
.end method
.method public captureStartValues(Landroidx/transition/TransitionValues;)V
.locals 0
.param p1 # Landroidx/transition/TransitionValues;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0, p1}, Landroidx/transition/ChangeClipBounds;->captureValues(Landroidx/transition/TransitionValues;)V
return-void
.end method
.method public createAnimator(Landroid/view/ViewGroup;Landroidx/transition/TransitionValues;Landroidx/transition/TransitionValues;)Landroid/animation/Animator;
.locals 7
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
const/4 p1, 0x0
if-eqz p2, :cond_6
if-eqz p3, :cond_6
iget-object v0, p2, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
const-string v1, "android:clipBounds:clip"
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
iget-object v0, p3, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
goto :goto_2
:cond_0
iget-object v0, p2, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/graphics/Rect;
iget-object v2, p3, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/graphics/Rect;
const/4 v2, 0x1
const/4 v3, 0x0
if-nez v1, :cond_1
const/4 v4, 0x1
goto :goto_0
:cond_1
const/4 v4, 0x0
:goto_0
if-nez v0, :cond_2
if-nez v1, :cond_2
return-object p1
:cond_2
const-string v5, "android:clipBounds:bounds"
if-nez v0, :cond_3
iget-object p2, p2, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
invoke-interface {p2, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
move-object v0, p2
check-cast v0, Landroid/graphics/Rect;
goto :goto_1
:cond_3
if-nez v1, :cond_4
iget-object p2, p3, Landroidx/transition/TransitionValues;->values:Ljava/util/Map;
invoke-interface {p2, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
move-object v1, p2
check-cast v1, Landroid/graphics/Rect;
:cond_4
:goto_1
invoke-virtual {v0, v1}, Landroid/graphics/Rect;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_5
return-object p1
:cond_5
iget-object p1, p3, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
invoke-static {p1, v0}, Landroidx/core/view/ViewCompat;->setClipBounds(Landroid/view/View;Landroid/graphics/Rect;)V
new-instance p1, Landroidx/transition/RectEvaluator;
new-instance p2, Landroid/graphics/Rect;
invoke-direct {p2}, Landroid/graphics/Rect;-><init>()V
invoke-direct {p1, p2}, Landroidx/transition/RectEvaluator;-><init>(Landroid/graphics/Rect;)V
iget-object p2, p3, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
sget-object v5, Landroidx/transition/ViewUtils;->CLIP_BOUNDS:Landroid/util/Property;
const/4 v6, 0x2
new-array v6, v6, [Landroid/graphics/Rect;
aput-object v0, v6, v3
aput-object v1, v6, v2
invoke-static {p2, v5, p1, v6}, Landroid/animation/ObjectAnimator;->ofObject(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;
move-result-object p1
if-eqz v4, :cond_6
iget-object p2, p3, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
new-instance p3, Landroidx/transition/ChangeClipBounds$1;
invoke-direct {p3, p0, p2}, Landroidx/transition/ChangeClipBounds$1;-><init>(Landroidx/transition/ChangeClipBounds;Landroid/view/View;)V
invoke-virtual {p1, p3}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
:cond_6
:goto_2
return-object p1
.end method
.method public getTransitionProperties()[Ljava/lang/String;
.locals 1
sget-object v0, Landroidx/transition/ChangeClipBounds;->sTransitionProperties:[Ljava/lang/String;
return-object v0
.end method