apkfuckery/com.discord/smali/androidx/transition/TransitionManager.smali

591 lines
17 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/transition/TransitionManager;
.super Ljava/lang/Object;
.source "TransitionManager.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/transition/TransitionManager$MultiListener;
}
.end annotation
# static fields
.field public static final LOG_TAG:Ljava/lang/String; = "TransitionManager"
.field public static sDefaultTransition:Landroidx/transition/Transition;
.field public static sPendingTransitions:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroid/view/ViewGroup;",
">;"
}
.end annotation
.end field
.field public static sRunningTransitions:Ljava/lang/ThreadLocal;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ThreadLocal<",
"Ljava/lang/ref/WeakReference<",
"Landroidx/collection/ArrayMap<",
"Landroid/view/ViewGroup;",
"Ljava/util/ArrayList<",
"Landroidx/transition/Transition;",
">;>;>;>;"
}
.end annotation
.end field
# instance fields
.field public mScenePairTransitions:Landroidx/collection/ArrayMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/ArrayMap<",
"Landroidx/transition/Scene;",
"Landroidx/collection/ArrayMap<",
"Landroidx/transition/Scene;",
"Landroidx/transition/Transition;",
">;>;"
}
.end annotation
.end field
.field public mSceneTransitions:Landroidx/collection/ArrayMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/ArrayMap<",
"Landroidx/transition/Scene;",
"Landroidx/transition/Transition;",
">;"
}
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/transition/AutoTransition;
invoke-direct {v0}, Landroidx/transition/AutoTransition;-><init>()V
sput-object v0, Landroidx/transition/TransitionManager;->sDefaultTransition:Landroidx/transition/Transition;
new-instance v0, Ljava/lang/ThreadLocal;
invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V
sput-object v0, Landroidx/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
sput-object v0, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
return-void
.end method
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Landroidx/collection/ArrayMap;
invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
iput-object v0, p0, Landroidx/transition/TransitionManager;->mSceneTransitions:Landroidx/collection/ArrayMap;
new-instance v0, Landroidx/collection/ArrayMap;
invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
iput-object v0, p0, Landroidx/transition/TransitionManager;->mScenePairTransitions:Landroidx/collection/ArrayMap;
return-void
.end method
.method public static beginDelayedTransition(Landroid/view/ViewGroup;)V
.locals 1
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
const/4 v0, 0x0
invoke-static {p0, v0}, Landroidx/transition/TransitionManager;->beginDelayedTransition(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
return-void
.end method
.method public static beginDelayedTransition(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
.locals 1
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/transition/Transition;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
sget-object v0, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
invoke-virtual {v0, p0}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
invoke-static {p0}, Landroidx/core/view/ViewCompat;->isLaidOut(Landroid/view/View;)Z
move-result v0
if-eqz v0, :cond_1
sget-object v0, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
if-nez p1, :cond_0
sget-object p1, Landroidx/transition/TransitionManager;->sDefaultTransition:Landroidx/transition/Transition;
:cond_0
invoke-virtual {p1}, Landroidx/transition/Transition;->clone()Landroidx/transition/Transition;
move-result-object p1
invoke-static {p0, p1}, Landroidx/transition/TransitionManager;->sceneChangeSetup(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
const/4 v0, 0x0
invoke-static {p0, v0}, Landroidx/transition/Scene;->setCurrentScene(Landroid/view/ViewGroup;Landroidx/transition/Scene;)V
invoke-static {p0, p1}, Landroidx/transition/TransitionManager;->sceneChangeRunTransition(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
:cond_1
return-void
.end method
.method public static changeScene(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
.locals 3
invoke-virtual {p0}, Landroidx/transition/Scene;->getSceneRoot()Landroid/view/ViewGroup;
move-result-object v0
sget-object v1, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_3
invoke-static {v0}, Landroidx/transition/Scene;->getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
move-result-object v1
if-nez p1, :cond_1
if-eqz v1, :cond_0
invoke-virtual {v1}, Landroidx/transition/Scene;->exit()V
:cond_0
invoke-virtual {p0}, Landroidx/transition/Scene;->enter()V
goto :goto_0
:cond_1
sget-object v2, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
invoke-virtual {p1}, Landroidx/transition/Transition;->clone()Landroidx/transition/Transition;
move-result-object p1
invoke-virtual {p1, v0}, Landroidx/transition/Transition;->setSceneRoot(Landroid/view/ViewGroup;)Landroidx/transition/Transition;
if-eqz v1, :cond_2
invoke-virtual {v1}, Landroidx/transition/Scene;->isCreatedFromLayoutResource()Z
move-result v1
if-eqz v1, :cond_2
const/4 v1, 0x1
invoke-virtual {p1, v1}, Landroidx/transition/Transition;->setCanRemoveViews(Z)V
:cond_2
invoke-static {v0, p1}, Landroidx/transition/TransitionManager;->sceneChangeSetup(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
invoke-virtual {p0}, Landroidx/transition/Scene;->enter()V
invoke-static {v0, p1}, Landroidx/transition/TransitionManager;->sceneChangeRunTransition(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
:cond_3
:goto_0
return-void
.end method
.method public static endTransitions(Landroid/view/ViewGroup;)V
.locals 3
sget-object v0, Landroidx/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
invoke-virtual {v0, p0}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
invoke-static {}, Landroidx/transition/TransitionManager;->getRunningTransitions()Landroidx/collection/ArrayMap;
move-result-object v0
invoke-virtual {v0, p0}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/ArrayList;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z
move-result v1
if-nez v1, :cond_0
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1, v0}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v0
add-int/lit8 v0, v0, -0x1
:goto_0
if-ltz v0, :cond_0
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/transition/Transition;
invoke-virtual {v2, p0}, Landroidx/transition/Transition;->forceToEnd(Landroid/view/ViewGroup;)V
add-int/lit8 v0, v0, -0x1
goto :goto_0
:cond_0
return-void
.end method
.method public static getRunningTransitions()Landroidx/collection/ArrayMap;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/collection/ArrayMap<",
"Landroid/view/ViewGroup;",
"Ljava/util/ArrayList<",
"Landroidx/transition/Transition;",
">;>;"
}
.end annotation
sget-object v0, Landroidx/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/ref/WeakReference;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/collection/ArrayMap;
if-eqz v0, :cond_0
return-object v0
:cond_0
new-instance v0, Landroidx/collection/ArrayMap;
invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
new-instance v1, Ljava/lang/ref/WeakReference;
invoke-direct {v1, v0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
sget-object v2, Landroidx/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
invoke-virtual {v2, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V
return-object v0
.end method
.method private getTransition(Landroidx/transition/Scene;)Landroidx/transition/Transition;
.locals 2
invoke-virtual {p1}, Landroidx/transition/Scene;->getSceneRoot()Landroid/view/ViewGroup;
move-result-object v0
if-eqz v0, :cond_0
invoke-static {v0}, Landroidx/transition/Scene;->getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
move-result-object v0
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/transition/TransitionManager;->mScenePairTransitions:Landroidx/collection/ArrayMap;
invoke-virtual {v1, p1}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/collection/ArrayMap;
if-eqz v1, :cond_0
invoke-virtual {v1, v0}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/transition/Transition;
if-eqz v0, :cond_0
return-object v0
:cond_0
iget-object v0, p0, Landroidx/transition/TransitionManager;->mSceneTransitions:Landroidx/collection/ArrayMap;
invoke-virtual {v0, p1}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroidx/transition/Transition;
if-eqz p1, :cond_1
goto :goto_0
:cond_1
sget-object p1, Landroidx/transition/TransitionManager;->sDefaultTransition:Landroidx/transition/Transition;
:goto_0
return-object p1
.end method
.method public static go(Landroidx/transition/Scene;)V
.locals 1
.param p0 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
sget-object v0, Landroidx/transition/TransitionManager;->sDefaultTransition:Landroidx/transition/Transition;
invoke-static {p0, v0}, Landroidx/transition/TransitionManager;->changeScene(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
return-void
.end method
.method public static go(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
.locals 0
.param p0 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/transition/Transition;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-static {p0, p1}, Landroidx/transition/TransitionManager;->changeScene(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
return-void
.end method
.method public static sceneChangeRunTransition(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
.locals 1
if-eqz p1, :cond_0
if-eqz p0, :cond_0
new-instance v0, Landroidx/transition/TransitionManager$MultiListener;
invoke-direct {v0, p1, p0}, Landroidx/transition/TransitionManager$MultiListener;-><init>(Landroidx/transition/Transition;Landroid/view/ViewGroup;)V
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->addOnAttachStateChangeListener(Landroid/view/View$OnAttachStateChangeListener;)V
invoke-virtual {p0}, Landroid/view/ViewGroup;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
move-result-object p0
invoke-virtual {p0, v0}, Landroid/view/ViewTreeObserver;->addOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V
:cond_0
return-void
.end method
.method public static sceneChangeSetup(Landroid/view/ViewGroup;Landroidx/transition/Transition;)V
.locals 2
invoke-static {}, Landroidx/transition/TransitionManager;->getRunningTransitions()Landroidx/collection/ArrayMap;
move-result-object v0
invoke-virtual {v0, p0}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/ArrayList;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v1
if-lez v1, :cond_0
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/transition/Transition;
invoke-virtual {v1, p0}, Landroidx/transition/Transition;->pause(Landroid/view/View;)V
goto :goto_0
:cond_0
if-eqz p1, :cond_1
const/4 v0, 0x1
invoke-virtual {p1, p0, v0}, Landroidx/transition/Transition;->captureValues(Landroid/view/ViewGroup;Z)V
:cond_1
invoke-static {p0}, Landroidx/transition/Scene;->getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
move-result-object p0
if-eqz p0, :cond_2
invoke-virtual {p0}, Landroidx/transition/Scene;->exit()V
:cond_2
return-void
.end method
# virtual methods
.method public setTransition(Landroidx/transition/Scene;Landroidx/transition/Scene;Landroidx/transition/Transition;)V
.locals 2
.param p1 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p3 # Landroidx/transition/Transition;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iget-object v0, p0, Landroidx/transition/TransitionManager;->mScenePairTransitions:Landroidx/collection/ArrayMap;
invoke-virtual {v0, p2}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/collection/ArrayMap;
if-nez v0, :cond_0
new-instance v0, Landroidx/collection/ArrayMap;
invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
iget-object v1, p0, Landroidx/transition/TransitionManager;->mScenePairTransitions:Landroidx/collection/ArrayMap;
invoke-virtual {v1, p2, v0}, Landroidx/collection/SimpleArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_0
invoke-virtual {v0, p1, p3}, Landroidx/collection/SimpleArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public setTransition(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
.locals 1
.param p1 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/transition/Transition;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iget-object v0, p0, Landroidx/transition/TransitionManager;->mSceneTransitions:Landroidx/collection/ArrayMap;
invoke-virtual {v0, p1, p2}, Landroidx/collection/SimpleArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public transitionTo(Landroidx/transition/Scene;)V
.locals 1
.param p1 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0, p1}, Landroidx/transition/TransitionManager;->getTransition(Landroidx/transition/Scene;)Landroidx/transition/Transition;
move-result-object v0
invoke-static {p1, v0}, Landroidx/transition/TransitionManager;->changeScene(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
return-void
.end method