apkfuckery/com.discord/smali/androidx/transition/Scene.smali
2020-11-21 22:11:07 +00:00

305 lines
8.1 KiB
Smali

.class public Landroidx/transition/Scene;
.super Ljava/lang/Object;
.source "Scene.java"
# instance fields
.field private mContext:Landroid/content/Context;
.field private mEnterAction:Ljava/lang/Runnable;
.field private mExitAction:Ljava/lang/Runnable;
.field private mLayout:Landroid/view/View;
.field private mLayoutId:I
.field private mSceneRoot:Landroid/view/ViewGroup;
# direct methods
.method public constructor <init>(Landroid/view/ViewGroup;)V
.locals 1
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/transition/Scene;->mLayoutId:I
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
return-void
.end method
.method private constructor <init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/transition/Scene;->mLayoutId:I
iput-object p3, p0, Landroidx/transition/Scene;->mContext:Landroid/content/Context;
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iput p2, p0, Landroidx/transition/Scene;->mLayoutId:I
return-void
.end method
.method public constructor <init>(Landroid/view/ViewGroup;Landroid/view/View;)V
.locals 1
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/transition/Scene;->mLayoutId:I
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iput-object p2, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
return-void
.end method
.method public static getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
.locals 1
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
sget v0, Landroidx/transition/R$id;->transition_current_scene:I
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->getTag(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroidx/transition/Scene;
return-object p0
.end method
.method public static getSceneForLayout(Landroid/view/ViewGroup;ILandroid/content/Context;)Landroidx/transition/Scene;
.locals 2
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # I
.annotation build Landroidx/annotation/LayoutRes;
.end annotation
.end param
.param p2 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
sget v0, Landroidx/transition/R$id;->transition_scene_layoutid_cache:I
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->getTag(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/util/SparseArray;
if-nez v1, :cond_0
new-instance v1, Landroid/util/SparseArray;
invoke-direct {v1}, Landroid/util/SparseArray;-><init>()V
invoke-virtual {p0, v0, v1}, Landroid/view/ViewGroup;->setTag(ILjava/lang/Object;)V
:cond_0
invoke-virtual {v1, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/transition/Scene;
if-eqz v0, :cond_1
return-object v0
:cond_1
new-instance v0, Landroidx/transition/Scene;
invoke-direct {v0, p0, p1, p2}, Landroidx/transition/Scene;-><init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
invoke-virtual {v1, p1, v0}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
return-object v0
.end method
.method public static setCurrentScene(Landroid/view/ViewGroup;Landroidx/transition/Scene;)V
.locals 1
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/transition/Scene;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
sget v0, Landroidx/transition/R$id;->transition_current_scene:I
invoke-virtual {p0, v0, p1}, Landroid/view/ViewGroup;->setTag(ILjava/lang/Object;)V
return-void
.end method
# virtual methods
.method public enter()V
.locals 3
iget v0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-gtz v0, :cond_0
iget-object v0, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
if-eqz v0, :cond_2
:cond_0
invoke-virtual {p0}, Landroidx/transition/Scene;->getSceneRoot()Landroid/view/ViewGroup;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewGroup;->removeAllViews()V
iget v0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-lez v0, :cond_1
iget-object v0, p0, Landroidx/transition/Scene;->mContext:Landroid/content/Context;
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
iget v1, p0, Landroidx/transition/Scene;->mLayoutId:I
iget-object v2, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
goto :goto_0
:cond_1
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iget-object v1, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
:cond_2
:goto_0
iget-object v0, p0, Landroidx/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
if-eqz v0, :cond_3
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
:cond_3
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
invoke-static {v0, p0}, Landroidx/transition/Scene;->setCurrentScene(Landroid/view/ViewGroup;Landroidx/transition/Scene;)V
return-void
.end method
.method public exit()V
.locals 1
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
invoke-static {v0}, Landroidx/transition/Scene;->getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
move-result-object v0
if-ne v0, p0, :cond_0
iget-object v0, p0, Landroidx/transition/Scene;->mExitAction:Ljava/lang/Runnable;
if-eqz v0, :cond_0
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
:cond_0
return-void
.end method
.method public getSceneRoot()Landroid/view/ViewGroup;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
return-object v0
.end method
.method public isCreatedFromLayoutResource()Z
.locals 1
iget v0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public setEnterAction(Ljava/lang/Runnable;)V
.locals 0
.param p1 # Ljava/lang/Runnable;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iput-object p1, p0, Landroidx/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
return-void
.end method
.method public setExitAction(Ljava/lang/Runnable;)V
.locals 0
.param p1 # Ljava/lang/Runnable;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iput-object p1, p0, Landroidx/transition/Scene;->mExitAction:Ljava/lang/Runnable;
return-void
.end method