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

338 lines
8.7 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Landroidx/appcompat/widget/ViewStubCompat;
.super Landroid/view/View;
.source "ViewStubCompat.java"
# annotations
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
}
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mInflatedId:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mInflatedViewRef:Ljava/lang/ref/WeakReference;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Landroid/view/View;",
">;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public mInflater:Landroid/view/LayoutInflater;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mLayoutResource:I
2019-07-24 11:27:29 +00:00
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
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
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p2}, Landroid/view/View;->setId(I)V
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/view/View;->setWillNotDraw(Z)V
2019-07-24 11:27:29 +00:00
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public dispatchDraw(Landroid/graphics/Canvas;)V
2019-07-24 11:27:29 +00:00
.locals 0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public draw(Landroid/graphics/Canvas;)V
2019-07-24 11:27:29 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
.annotation build Landroid/annotation/SuppressLint;
value = {
"MissingSuperCall"
}
.end annotation
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public getInflatedId()I
2019-07-24 11:27:29 +00:00
.locals 1
iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public getLayoutInflater()Landroid/view/LayoutInflater;
2019-07-24 11:27:29 +00:00
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater;
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public getLayoutResource()I
2019-07-24 11:27:29 +00:00
.locals 1
iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public inflate()Landroid/view/View;
2019-07-24 11:27:29 +00:00
.locals 4
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
.method public onMeasure(II)V
2019-07-24 11:27:29 +00:00
.locals 0
const/4 p1, 0x0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1, p1}, Landroid/view/View;->setMeasuredDimension(II)V
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setInflatedId(I)V
2019-07-24 11:27:29 +00:00
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setLayoutInflater(Landroid/view/LayoutInflater;)V
2019-07-24 11:27:29 +00:00
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater;
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setLayoutResource(I)V
2019-07-24 11:27:29 +00:00
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setOnInflateListener(Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;)V
2019-07-24 11:27:29 +00:00
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setVisibility(I)V
2019-07-24 11:27:29 +00:00
.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
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method