410 lines
14 KiB
Smali
410 lines
14 KiB
Smali
.class public final Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x1c
|
|
name = "PanelFeatureState"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState$SavedState;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field background:I
|
|
|
|
.field createdPanelView:Landroid/view/View;
|
|
|
|
.field decorView:Landroid/view/ViewGroup;
|
|
|
|
.field featureId:I
|
|
|
|
.field frozenActionViewState:Landroid/os/Bundle;
|
|
|
|
.field frozenMenuState:Landroid/os/Bundle;
|
|
|
|
.field gravity:I
|
|
|
|
.field isHandled:Z
|
|
|
|
.field isOpen:Z
|
|
|
|
.field isPrepared:Z
|
|
|
|
.field listMenuPresenter:Landroidx/appcompat/view/menu/ListMenuPresenter;
|
|
|
|
.field listPresenterContext:Landroid/content/Context;
|
|
|
|
.field menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
.field public qwertyMode:Z
|
|
|
|
.field refreshDecorView:Z
|
|
|
|
.field refreshMenuContent:Z
|
|
|
|
.field shownPanelView:Landroid/view/View;
|
|
|
|
.field wasLastOpen:Z
|
|
|
|
.field windowAnimations:I
|
|
|
|
.field x:I
|
|
|
|
.field y:I
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(I)V
|
|
.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
|
|
.method final applyFrozenState()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->frozenMenuState:Landroid/os/Bundle;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->frozenMenuState:Landroid/os/Bundle;
|
|
|
|
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
|
|
|
|
.method public final clearMenuPresenters()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
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
|
|
|
|
.method final getListMenuView(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)Landroidx/appcompat/view/menu/MenuView;
|
|
.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
|
|
|
|
.method public final hasPanelItems()Z
|
|
.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
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method final onRestoreInstanceState(Landroid/os/Parcelable;)V
|
|
.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
|
|
|
|
.method final onSaveInstanceState()Landroid/os/Parcelable;
|
|
.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
|
|
|
|
.method final setMenu(Landroidx/appcompat/view/menu/MenuBuilder;)V
|
|
.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
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$PanelFeatureState;->menu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
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
|
|
|
|
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_2
|
|
return-void
|
|
.end method
|
|
|
|
.method final setStyle(Landroid/content/Context;)V
|
|
.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
|
|
|
|
iget v2, v0, Landroid/util/TypedValue;->resourceId:I
|
|
|
|
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 v2, v0, Landroid/util/TypedValue;->resourceId:I
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
iget v0, v0, Landroid/util/TypedValue;->resourceId:I
|
|
|
|
:goto_0
|
|
invoke-virtual {v1, v0, v3}, Landroid/content/res/Resources$Theme;->applyStyle(IZ)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
sget v0, Landroidx/appcompat/R$style;->Theme_AppCompat_CompactMenu:I
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
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
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
|
|
|
|
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
|