apkfuckery/com.discord/smali/androidx/appcompat/app/AlertController$AlertParams.smali

526 lines
17 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public Landroidx/appcompat/app/AlertController$AlertParams;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "AlertController.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/appcompat/app/AlertController;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "AlertParams"
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/app/AlertController$AlertParams$OnPrepareListViewListener;
}
.end annotation
# instance fields
.field public mAdapter:Landroid/widget/ListAdapter;
.field public mCancelable:Z
.field public mCheckedItem:I
.field public mCheckedItems:[Z
.field public final mContext:Landroid/content/Context;
.field public mCursor:Landroid/database/Cursor;
.field public mCustomTitleView:Landroid/view/View;
.field public mForceInverseBackground:Z
.field public mIcon:Landroid/graphics/drawable/Drawable;
.field public mIconAttrId:I
.field public mIconId:I
.field public final mInflater:Landroid/view/LayoutInflater;
.field public mIsCheckedColumn:Ljava/lang/String;
.field public mIsMultiChoice:Z
.field public mIsSingleChoice:Z
.field public mItems:[Ljava/lang/CharSequence;
.field public mLabelColumn:Ljava/lang/String;
.field public mMessage:Ljava/lang/CharSequence;
.field public mNegativeButtonIcon:Landroid/graphics/drawable/Drawable;
.field public mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;
.field public mNegativeButtonText:Ljava/lang/CharSequence;
.field public mNeutralButtonIcon:Landroid/graphics/drawable/Drawable;
.field public mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;
.field public mNeutralButtonText:Ljava/lang/CharSequence;
.field public mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;
.field public mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;
.field public mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
.field public mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;
.field public mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
.field public mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
.field public mOnPrepareListViewListener:Landroidx/appcompat/app/AlertController$AlertParams$OnPrepareListViewListener;
.field public mPositiveButtonIcon:Landroid/graphics/drawable/Drawable;
.field public mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;
.field public mPositiveButtonText:Ljava/lang/CharSequence;
.field public mRecycleOnMeasure:Z
.field public mTitle:Ljava/lang/CharSequence;
.field public mView:Landroid/view/View;
.field public mViewLayoutResId:I
.field public mViewSpacingBottom:I
.field public mViewSpacingLeft:I
.field public mViewSpacingRight:I
.field public mViewSpacingSpecified:Z
.field public mViewSpacingTop:I
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIconId:I
iput v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIconAttrId:I
iput-boolean v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingSpecified:Z
const/4 v0, -0x1
iput v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCheckedItem:I
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mRecycleOnMeasure:Z
iput-object p1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
iput-boolean v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCancelable:Z
const-string v0, "layout_inflater"
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroid/view/LayoutInflater;
iput-object p1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mInflater:Landroid/view/LayoutInflater;
return-void
.end method
.method private createListView(Landroidx/appcompat/app/AlertController;)V
2019-02-04 20:29:01 +00:00
.locals 11
2019-02-04 20:08:30 +00:00
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mInflater:Landroid/view/LayoutInflater;
iget v1, p1, Landroidx/appcompat/app/AlertController;->mListLayout:I
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Landroidx/appcompat/app/AlertController$RecycleListView;
iget-boolean v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIsMultiChoice:Z
const/4 v8, 0x1
if-eqz v1, :cond_1
2019-02-04 20:29:01 +00:00
iget-object v4, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-nez v4, :cond_0
2019-02-04 20:08:30 +00:00
new-instance v9, Landroidx/appcompat/app/AlertController$AlertParams$1;
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
iget v4, p1, Landroidx/appcompat/app/AlertController;->mMultiChoiceItemLayout:I
const v5, 0x1020014
iget-object v6, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
move-object v1, v9
move-object v2, p0
move-object v7, v0
invoke-direct/range {v1 .. v7}, Landroidx/appcompat/app/AlertController$AlertParams$1;-><init>(Landroidx/appcompat/app/AlertController$AlertParams;Landroid/content/Context;II[Ljava/lang/CharSequence;Landroidx/appcompat/app/AlertController$RecycleListView;)V
2019-02-04 20:29:01 +00:00
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_0
new-instance v9, Landroidx/appcompat/app/AlertController$AlertParams$2;
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
const/4 v5, 0x0
move-object v1, v9
move-object v2, p0
move-object v6, v0
move-object v7, p1
invoke-direct/range {v1 .. v7}, Landroidx/appcompat/app/AlertController$AlertParams$2;-><init>(Landroidx/appcompat/app/AlertController$AlertParams;Landroid/content/Context;Landroid/database/Cursor;ZLandroidx/appcompat/app/AlertController$RecycleListView;Landroidx/appcompat/app/AlertController;)V
2019-02-04 20:29:01 +00:00
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_1
iget-boolean v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIsSingleChoice:Z
if-eqz v1, :cond_2
iget v1, p1, Landroidx/appcompat/app/AlertController;->mSingleChoiceItemLayout:I
move v4, v1
2019-02-04 20:29:01 +00:00
goto :goto_0
2019-02-04 20:08:30 +00:00
:cond_2
iget v1, p1, Landroidx/appcompat/app/AlertController;->mListItemLayout:I
2019-02-04 20:29:01 +00:00
move v4, v1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:goto_0
iget-object v5, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const v1, 0x1020014
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-eqz v5, :cond_3
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-instance v9, Landroid/widget/SimpleCursorAdapter;
2019-02-04 20:08:30 +00:00
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
new-array v6, v8, [Ljava/lang/String;
2019-02-04 20:29:01 +00:00
iget-object v2, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const/4 v7, 0x0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput-object v2, v6, v7
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-array v10, v8, [I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput v1, v10, v7
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v2, v9
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v7, v10
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-direct/range {v2 .. v7}, Landroid/widget/SimpleCursorAdapter;-><init>(Landroid/content/Context;ILandroid/database/Cursor;[Ljava/lang/String;[I)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_3
iget-object v9, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
2019-02-04 20:29:01 +00:00
if-eqz v9, :cond_4
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_4
new-instance v9, Landroidx/appcompat/app/AlertController$CheckedItemAdapter;
2019-02-04 20:29:01 +00:00
iget-object v2, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
2019-02-04 20:08:30 +00:00
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
2019-02-04 20:29:01 +00:00
invoke-direct {v9, v2, v4, v1, v3}, Landroidx/appcompat/app/AlertController$CheckedItemAdapter;-><init>(Landroid/content/Context;II[Ljava/lang/CharSequence;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:goto_1
2019-02-04 20:08:30 +00:00
iget-object v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mOnPrepareListViewListener:Landroidx/appcompat/app/AlertController$AlertParams$OnPrepareListViewListener;
if-eqz v1, :cond_5
invoke-interface {v1, v0}, Landroidx/appcompat/app/AlertController$AlertParams$OnPrepareListViewListener;->onPrepareListView(Landroid/widget/ListView;)V
:cond_5
iput-object v9, p1, Landroidx/appcompat/app/AlertController;->mAdapter:Landroid/widget/ListAdapter;
iget v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCheckedItem:I
iput v1, p1, Landroidx/appcompat/app/AlertController;->mCheckedItem:I
iget-object v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
if-eqz v1, :cond_6
new-instance v1, Landroidx/appcompat/app/AlertController$AlertParams$3;
invoke-direct {v1, p0, p1}, Landroidx/appcompat/app/AlertController$AlertParams$3;-><init>(Landroidx/appcompat/app/AlertController$AlertParams;Landroidx/appcompat/app/AlertController;)V
invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertController$RecycleListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
2019-02-04 20:29:01 +00:00
goto :goto_2
2019-02-04 20:08:30 +00:00
:cond_6
iget-object v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;
if-eqz v1, :cond_7
new-instance v1, Landroidx/appcompat/app/AlertController$AlertParams$4;
invoke-direct {v1, p0, v0, p1}, Landroidx/appcompat/app/AlertController$AlertParams$4;-><init>(Landroidx/appcompat/app/AlertController$AlertParams;Landroidx/appcompat/app/AlertController$RecycleListView;Landroidx/appcompat/app/AlertController;)V
2019-02-04 20:29:01 +00:00
invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertController$RecycleListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
2019-02-04 20:08:30 +00:00
:cond_7
2019-02-04 20:29:01 +00:00
:goto_2
2019-02-04 20:08:30 +00:00
iget-object v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
if-eqz v1, :cond_8
invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertController$RecycleListView;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V
:cond_8
iget-boolean v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIsSingleChoice:Z
if-eqz v1, :cond_9
invoke-virtual {v0, v8}, Landroidx/appcompat/app/AlertController$RecycleListView;->setChoiceMode(I)V
2019-02-04 20:29:01 +00:00
goto :goto_3
2019-02-04 20:08:30 +00:00
:cond_9
iget-boolean v1, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIsMultiChoice:Z
if-eqz v1, :cond_a
const/4 v1, 0x2
invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertController$RecycleListView;->setChoiceMode(I)V
:cond_a
2019-02-04 20:29:01 +00:00
:goto_3
2019-02-04 20:08:30 +00:00
iput-object v0, p1, Landroidx/appcompat/app/AlertController;->mListView:Landroid/widget/ListView;
return-void
.end method
# virtual methods
.method public apply(Landroidx/appcompat/app/AlertController;)V
.locals 7
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCustomTitleView:Landroid/view/View;
if-eqz v0, :cond_0
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setCustomTitle(Landroid/view/View;)V
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;
if-eqz v0, :cond_1
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setTitle(Ljava/lang/CharSequence;)V
:cond_1
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIcon:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_2
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setIcon(Landroid/graphics/drawable/Drawable;)V
:cond_2
iget v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIconId:I
if-eqz v0, :cond_3
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setIcon(I)V
:cond_3
iget v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mIconAttrId:I
if-eqz v0, :cond_4
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->getIconAttributeResId(I)I
move-result v0
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setIcon(I)V
:cond_4
:goto_0
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;
if-eqz v0, :cond_5
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setMessage(Ljava/lang/CharSequence;)V
:cond_5
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;
if-nez v0, :cond_6
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mPositiveButtonIcon:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_7
:cond_6
const/4 v2, -0x1
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;
iget-object v4, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;
const/4 v5, 0x0
iget-object v6, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mPositiveButtonIcon:Landroid/graphics/drawable/Drawable;
move-object v1, p1
invoke-virtual/range {v1 .. v6}, Landroidx/appcompat/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;Landroid/graphics/drawable/Drawable;)V
:cond_7
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;
if-nez v0, :cond_8
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNegativeButtonIcon:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_9
:cond_8
const/4 v2, -0x2
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;
iget-object v4, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;
const/4 v5, 0x0
iget-object v6, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNegativeButtonIcon:Landroid/graphics/drawable/Drawable;
move-object v1, p1
invoke-virtual/range {v1 .. v6}, Landroidx/appcompat/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;Landroid/graphics/drawable/Drawable;)V
:cond_9
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;
if-nez v0, :cond_a
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNeutralButtonIcon:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_b
:cond_a
const/4 v2, -0x3
iget-object v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;
iget-object v4, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;
const/4 v5, 0x0
iget-object v6, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mNeutralButtonIcon:Landroid/graphics/drawable/Drawable;
move-object v1, p1
invoke-virtual/range {v1 .. v6}, Landroidx/appcompat/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;Landroid/graphics/drawable/Drawable;)V
:cond_b
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
if-nez v0, :cond_c
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
if-nez v0, :cond_c
iget-object v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
if-eqz v0, :cond_d
:cond_c
invoke-direct {p0, p1}, Landroidx/appcompat/app/AlertController$AlertParams;->createListView(Landroidx/appcompat/app/AlertController;)V
:cond_d
2019-02-04 20:29:01 +00:00
iget-object v2, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mView:Landroid/view/View;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-eqz v2, :cond_f
2019-02-04 20:08:30 +00:00
iget-boolean v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingSpecified:Z
if-eqz v0, :cond_e
iget v3, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingLeft:I
iget v4, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingTop:I
iget v5, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingRight:I
iget v6, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewSpacingBottom:I
move-object v1, p1
invoke-virtual/range {v1 .. v6}, Landroidx/appcompat/app/AlertController;->setView(Landroid/view/View;IIII)V
return-void
:cond_e
2019-02-04 20:29:01 +00:00
invoke-virtual {p1, v2}, Landroidx/appcompat/app/AlertController;->setView(Landroid/view/View;)V
2019-02-04 20:08:30 +00:00
return-void
:cond_f
iget v0, p0, Landroidx/appcompat/app/AlertController$AlertParams;->mViewLayoutResId:I
if-eqz v0, :cond_10
invoke-virtual {p1, v0}, Landroidx/appcompat/app/AlertController;->setView(I)V
:cond_10
return-void
.end method