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

308 lines
8.1 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +00:00
.class public Landroidx/transition/Scene;
.super Ljava/lang/Object;
.source "Scene.java"
# instance fields
2020-11-16 01:00:50 +00:00
.field public mContext:Landroid/content/Context;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
.field public mEnterAction:Ljava/lang/Runnable;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
.field public mExitAction:Ljava/lang/Runnable;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
.field public mLayout:Landroid/view/View;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
.field public mLayoutId:I
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
.field public mSceneRoot:Landroid/view/ViewGroup;
2020-11-12 02:11:44 +00:00
# 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
2020-11-16 01:00:50 +00:00
.method public constructor <init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
2020-11-12 02:11:44 +00:00
.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;
2020-11-16 01:00:50 +00:00
move-result-object v0
check-cast v0, Landroid/util/SparseArray;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
if-nez v0, :cond_0
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
new-instance v0, Landroid/util/SparseArray;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
sget v1, Landroidx/transition/R$id;->transition_scene_layoutid_cache:I
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
invoke-virtual {p0, v1, v0}, Landroid/view/ViewGroup;->setTag(ILjava/lang/Object;)V
2020-11-12 02:11:44 +00:00
:cond_0
2020-11-16 01:00:50 +00:00
invoke-virtual {v0, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
move-result-object v1
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
check-cast v1, Landroidx/transition/Scene;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
if-eqz v1, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
return-object v1
2020-11-12 02:11:44 +00:00
:cond_1
2020-11-16 01:00:50 +00:00
new-instance v1, Landroidx/transition/Scene;
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
invoke-direct {v1, p0, p1, p2}, Landroidx/transition/Scene;-><init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
invoke-virtual {v0, p1, v1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
return-object v1
2020-11-12 02:11:44 +00:00
.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