apkfuckery/com.discord/smali/androidx/appcompat/widget/ViewStubCompat.smali

354 lines
9.3 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public final Landroidx/appcompat/widget/ViewStubCompat;
.super Landroid/view/View;
.source "ViewStubCompat.java"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
}
.end annotation
# instance fields
.field public mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
.field public mInflatedId:I
.field public mInflatedViewRef:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Landroid/view/View;",
">;"
}
.end annotation
.end field
.field public mInflater:Landroid/view/LayoutInflater;
.field public mLayoutResource:I
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
2020-09-16 23:45:23 +00:00
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2020-05-17 12:40:10 +00:00
const/4 v0, 0x0
invoke-direct {p0, p1, p2, v0}, Landroidx/appcompat/widget/ViewStubCompat;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 2
2020-09-16 23:45:23 +00:00
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2020-05-17 12:40:10 +00:00
invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
const/4 v0, 0x0
iput v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
sget-object v1, Landroidx/appcompat/R$styleable;->ViewStubCompat:[I
invoke-virtual {p1, p2, v1, p3, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object p1
sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_inflatedId:I
const/4 p3, -0x1
invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result p2
iput p2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_layout:I
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result p2
iput p2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_id:I
invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result p2
invoke-virtual {p0, p2}, Landroid/view/View;->setId(I)V
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
const/16 p1, 0x8
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ViewStubCompat;->setVisibility(I)V
const/4 p1, 0x1
invoke-virtual {p0, p1}, Landroid/view/View;->setWillNotDraw(Z)V
return-void
.end method
# virtual methods
.method public dispatchDraw(Landroid/graphics/Canvas;)V
.locals 0
return-void
.end method
.method public draw(Landroid/graphics/Canvas;)V
.locals 0
.annotation build Landroid/annotation/SuppressLint;
value = {
"MissingSuperCall"
}
.end annotation
return-void
.end method
.method public getInflatedId()I
.locals 1
iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
return v0
.end method
.method public getLayoutInflater()Landroid/view/LayoutInflater;
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater;
return-object v0
.end method
.method public getLayoutResource()I
.locals 1
iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
return v0
.end method
.method public inflate()Landroid/view/View;
.locals 4
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v0
instance-of v1, v0, Landroid/view/ViewGroup;
if-eqz v1, :cond_5
iget v1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
if-eqz v1, :cond_4
check-cast v0, Landroid/view/ViewGroup;
iget-object v1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater;
if-eqz v1, :cond_0
goto :goto_0
:cond_0
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v1
:goto_0
iget v2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
const/4 v3, 0x0
invoke-virtual {v1, v2, v0, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v1
iget v2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
const/4 v3, -0x1
if-eq v2, v3, :cond_1
invoke-virtual {v1, v2}, Landroid/view/View;->setId(I)V
:cond_1
invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->indexOfChild(Landroid/view/View;)I
move-result v2
invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->removeViewInLayout(Landroid/view/View;)V
invoke-virtual {p0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v3
if-eqz v3, :cond_2
invoke-virtual {v0, v1, v2, v3}, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
goto :goto_1
:cond_2
invoke-virtual {v0, v1, v2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;I)V
:goto_1
new-instance v0, Ljava/lang/ref/WeakReference;
invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedViewRef:Ljava/lang/ref/WeakReference;
iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
if-eqz v0, :cond_3
invoke-interface {v0, p0, v1}, Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;->onInflate(Landroidx/appcompat/widget/ViewStubCompat;Landroid/view/View;)V
:cond_3
return-object v1
:cond_4
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "ViewStub must have a valid layoutResource"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_5
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "ViewStub must have a non-null ViewGroup viewParent"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public onMeasure(II)V
.locals 0
const/4 p1, 0x0
invoke-virtual {p0, p1, p1}, Landroid/view/View;->setMeasuredDimension(II)V
return-void
.end method
.method public setInflatedId(I)V
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
return-void
.end method
.method public setLayoutInflater(Landroid/view/LayoutInflater;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater;
return-void
.end method
.method public setLayoutResource(I)V
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
return-void
.end method
.method public setOnInflateListener(Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
return-void
.end method
.method public setVisibility(I)V
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedViewRef:Ljava/lang/ref/WeakReference;
if-eqz v0, :cond_1
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/View;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "setVisibility called on un-referenced view"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
invoke-super {p0, p1}, Landroid/view/View;->setVisibility(I)V
if-eqz p1, :cond_2
const/4 v0, 0x4
if-ne p1, v0, :cond_3
:cond_2
invoke-virtual {p0}, Landroidx/appcompat/widget/ViewStubCompat;->inflate()Landroid/view/View;
:cond_3
:goto_0
return-void
.end method