apkfuckery/com.discord/smali/androidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState.smali

395 lines
13 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;
.super Ljava/lang/Object;
.source "AppCompatDelegateImpl.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/appcompat/app/AppCompatDelegateImpl;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x19
2019-07-24 11:27:29 +00:00
name = "PanelFeatureState"
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;
}
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public background:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public createdPanelView:Landroid/view/View;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public decorView:Landroid/view/ViewGroup;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public featureId:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public frozenActionViewState:Landroid/os/Bundle;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public frozenMenuState:Landroid/os/Bundle;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public gravity:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public isHandled:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public isOpen:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public isPrepared:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public listPresenterContext:Landroid/content/Context;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public menu:Landroidx/appcompat/view/menu/MenuBuilder;
2019-07-24 11:27:29 +00:00
.field public qwertyMode:Z
2019-12-06 03:29:40 +00:00
.field public refreshDecorView:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public refreshMenuContent:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public shownPanelView:Landroid/view/View;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public wasLastOpen:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public windowAnimations:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public x:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public y:I
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(I)V
2019-07-24 11:27:29 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->featureId:I
const/4 p1, 0x0
iput-boolean p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->refreshDecorView:Z
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public applyFrozenState()V
2019-07-24 11:27:29 +00:00
.locals 2
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->frozenMenuState:Landroid/os/Bundle;
if-eqz v1, :cond_0
invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/MenuBuilder;->restorePresenterStates(Landroid/os/Bundle;)V
const/4 v0, 0x0
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->frozenMenuState:Landroid/os/Bundle;
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public clearMenuPresenters()V
2019-07-24 11:27:29 +00:00
.locals 2
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/MenuBuilder;->removeMenuPresenter(Landroidx/appcompat/view/menu/MenuPresenter;)V
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public getListMenuView(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)Landroidx/appcompat/view/menu/MenuView;
2019-07-24 11:27:29 +00:00
.locals 3
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-nez v0, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
if-nez v0, :cond_1
new-instance v0, Landroidx/appcompat/view/menu/ListMenuPresenter;
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listPresenterContext:Landroid/content/Context;
sget v2, Landroidx/appcompat/R$layout;->abc_list_menu_item_layout:I
invoke-direct {v0, v1, v2}, Landroidx/appcompat/view/menu/ListMenuPresenter;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
invoke-virtual {v0, p1}, Landroidx/appcompat/view/menu/ListMenuPresenter;->setCallback(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)V
iget-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;->addMenuPresenter(Landroidx/appcompat/view/menu/MenuPresenter;)V
:cond_1
iget-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->decorView:Landroid/view/ViewGroup;
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/ListMenuPresenter;->getMenuView(Landroid/view/ViewGroup;)Landroidx/appcompat/view/menu/MenuView;
move-result-object p1
return-object p1
.end method
2019-12-06 03:29:40 +00:00
.method public hasPanelItems()Z
2019-07-24 11:27:29 +00:00
.locals 3
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->shownPanelView:Landroid/view/View;
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->createdPanelView:Landroid/view/View;
const/4 v2, 0x1
if-eqz v0, :cond_1
return v2
:cond_1
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/view/menu/ListMenuPresenter;->getAdapter()Landroid/widget/ListAdapter;
move-result-object v0
invoke-interface {v0}, Landroid/widget/ListAdapter;->getCount()I
move-result v0
if-lez v0, :cond_2
2019-12-06 03:29:40 +00:00
const/4 v1, 0x1
2019-07-24 11:27:29 +00:00
:cond_2
return v1
.end method
2019-12-06 03:29:40 +00:00
.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
2019-07-24 11:27:29 +00:00
.locals 1
check-cast p1, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;
iget v0, p1, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->featureId:I
iput v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->featureId:I
iget-boolean v0, p1, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->isOpen:Z
iput-boolean v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->wasLastOpen:Z
iget-object p1, p1, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->menuState:Landroid/os/Bundle;
iput-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->frozenMenuState:Landroid/os/Bundle;
const/4 p1, 0x0
iput-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->shownPanelView:Landroid/view/View;
iput-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->decorView:Landroid/view/ViewGroup;
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onSaveInstanceState()Landroid/os/Parcelable;
2019-07-24 11:27:29 +00:00
.locals 3
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;
invoke-direct {v0}, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;-><init>()V
iget v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->featureId:I
iput v1, v0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->featureId:I
iget-boolean v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->isOpen:Z
iput-boolean v1, v0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->isOpen:Z
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v1, :cond_0
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
iput-object v1, v0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->menuState:Landroid/os/Bundle;
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
iget-object v2, v0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;->menuState:Landroid/os/Bundle;
invoke-virtual {v1, v2}, Landroidx/appcompat/view/menu/MenuBuilder;->savePresenterStates(Landroid/os/Bundle;)V
:cond_0
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public setMenu(Landroidx/appcompat/view/menu/MenuBuilder;)V
2019-07-24 11:27:29 +00:00
.locals 2
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-ne p1, v0, :cond_0
return-void
:cond_0
if-eqz v0, :cond_1
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/MenuBuilder;->removeMenuPresenter(Landroidx/appcompat/view/menu/MenuPresenter;)V
:cond_1
iput-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_2
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
if-eqz v0, :cond_2
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;->addMenuPresenter(Landroidx/appcompat/view/menu/MenuPresenter;)V
:cond_2
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setStyle(Landroid/content/Context;)V
2019-07-24 11:27:29 +00:00
.locals 4
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->newTheme()Landroid/content/res/Resources$Theme;
move-result-object v1
invoke-virtual {p1}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/content/res/Resources$Theme;->setTo(Landroid/content/res/Resources$Theme;)V
sget v2, Landroidx/appcompat/R$attr;->actionBarPopupTheme:I
const/4 v3, 0x1
invoke-virtual {v1, v2, v0, v3}, Landroid/content/res/Resources$Theme;->resolveAttribute(ILandroid/util/TypedValue;Z)Z
iget v2, v0, Landroid/util/TypedValue;->resourceId:I
if-eqz v2, :cond_0
invoke-virtual {v1, v2, v3}, Landroid/content/res/Resources$Theme;->applyStyle(IZ)V
:cond_0
sget v2, Landroidx/appcompat/R$attr;->panelMenuListTheme:I
invoke-virtual {v1, v2, v0, v3}, Landroid/content/res/Resources$Theme;->resolveAttribute(ILandroid/util/TypedValue;Z)Z
iget v0, v0, Landroid/util/TypedValue;->resourceId:I
2019-12-06 03:29:40 +00:00
if-eqz v0, :cond_1
2019-07-24 11:27:29 +00:00
invoke-virtual {v1, v0, v3}, Landroid/content/res/Resources$Theme;->applyStyle(IZ)V
goto :goto_0
:cond_1
sget v0, Landroidx/appcompat/R$style;->Theme_AppCompat_CompactMenu:I
invoke-virtual {v1, v0, v3}, Landroid/content/res/Resources$Theme;->applyStyle(IZ)V
:goto_0
new-instance v0, Landroidx/appcompat/view/ContextThemeWrapper;
const/4 v2, 0x0
invoke-direct {v0, p1, v2}, Landroidx/appcompat/view/ContextThemeWrapper;-><init>(Landroid/content/Context;I)V
2019-12-06 03:29:40 +00:00
invoke-virtual {v0}, Landroidx/appcompat/view/ContextThemeWrapper;->getTheme()Landroid/content/res/Resources$Theme;
2019-07-24 11:27:29 +00:00
move-result-object p1
invoke-virtual {p1, v1}, Landroid/content/res/Resources$Theme;->setTo(Landroid/content/res/Resources$Theme;)V
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->listPresenterContext:Landroid/content/Context;
sget-object p1, Landroidx/appcompat/R$styleable;->AppCompatTheme:[I
invoke-virtual {v0, p1}, Landroid/content/Context;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object p1
sget v0, Landroidx/appcompat/R$styleable;->AppCompatTheme_panelBackground:I
invoke-virtual {p1, v0, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v0
iput v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->background:I
sget v0, Landroidx/appcompat/R$styleable;->AppCompatTheme_android_windowAnimationStyle:I
invoke-virtual {p1, v0, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v0
iput v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->windowAnimations:I
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method