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

1671 lines
48 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class Landroidx/appcompat/widget/ActionMenuPresenter;
.super Landroidx/appcompat/view/menu/BaseMenuPresenter;
.source "ActionMenuPresenter.java"
# interfaces
.implements Landroidx/core/view/ActionProvider$SubUiVisibilityListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;,
Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;,
Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;,
Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;,
Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;,
Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;,
Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;
}
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "ActionMenuPresenter"
# instance fields
.field private final mActionButtonGroups:Landroid/util/SparseBooleanArray;
.field mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
.field private mActionItemWidthLimit:I
.field private mExpandedActionViewsExclusive:Z
.field private mMaxItems:I
.field private mMaxItemsSet:Z
.field private mMinCellSize:I
.field mOpenSubMenuId:I
.field mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
.field mOverflowPopup:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;
.field private mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
.field private mPendingOverflowIconSet:Z
.field private mPopupCallback:Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
.field final mPopupPresenterCallback:Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;
.field mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
.field private mReserveOverflow:Z
.field private mReserveOverflowSet:Z
.field private mScrapActionButtonView:Landroid/view/View;
.field private mStrictWidthLimit:Z
.field private mWidthLimit:I
.field private mWidthLimitSet:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
sget v0, Landroidx/appcompat/R$layout;->abc_action_menu_layout:I
sget v1, Landroidx/appcompat/R$layout;->abc_action_menu_item_layout:I
invoke-direct {p0, p1, v0, v1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;-><init>(Landroid/content/Context;II)V
new-instance p1, Landroid/util/SparseBooleanArray;
invoke-direct {p1}, Landroid/util/SparseBooleanArray;-><init>()V
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonGroups:Landroid/util/SparseBooleanArray;
new-instance p1, Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;
invoke-direct {p1, p0}, Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;)V
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPopupPresenterCallback:Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;
return-void
.end method
.method static synthetic access$000(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method static synthetic access$100(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method static synthetic access$200(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuView;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
return-object p0
.end method
.method static synthetic access$300(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method static synthetic access$400(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method static synthetic access$500(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuView;
.locals 0
iget-object p0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
return-object p0
.end method
.method private findViewForItem(Landroid/view/MenuItem;)Landroid/view/View;
.locals 6
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v0, Landroid/view/ViewGroup;
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
:cond_0
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v2
const/4 v3, 0x0
:goto_0
if-ge v3, v2, :cond_2
invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v4
instance-of v5, v4, Landroidx/appcompat/view/menu/MenuView$ItemView;
if-eqz v5, :cond_1
move-object v5, v4
check-cast v5, Landroidx/appcompat/view/menu/MenuView$ItemView;
invoke-interface {v5}, Landroidx/appcompat/view/menu/MenuView$ItemView;->getItemData()Landroidx/appcompat/view/menu/MenuItemImpl;
move-result-object v5
if-ne v5, p1, :cond_1
return-object v4
:cond_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_2
return-object v1
.end method
# virtual methods
.method public bindItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroidx/appcompat/view/menu/MenuView$ItemView;)V
.locals 1
const/4 v0, 0x0
invoke-interface {p2, p1, v0}, Landroidx/appcompat/view/menu/MenuView$ItemView;->initialize(Landroidx/appcompat/view/menu/MenuItemImpl;I)V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast p1, Landroidx/appcompat/widget/ActionMenuView;
check-cast p2, Landroidx/appcompat/view/menu/ActionMenuItemView;
invoke-virtual {p2, p1}, Landroidx/appcompat/view/menu/ActionMenuItemView;->setItemInvoker(Landroidx/appcompat/view/menu/MenuBuilder$ItemInvoker;)V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPopupCallback:Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
if-nez p1, :cond_0
new-instance p1, Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
invoke-direct {p1, p0}, Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;)V
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPopupCallback:Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
:cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPopupCallback:Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
invoke-virtual {p2, p1}, Landroidx/appcompat/view/menu/ActionMenuItemView;->setPopupCallback(Landroidx/appcompat/view/menu/ActionMenuItemView$PopupCallback;)V
return-void
.end method
.method public dismissPopupMenus()Z
.locals 2
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->hideOverflowMenu()Z
move-result v0
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->hideSubMenus()Z
move-result v1
or-int/2addr v0, v1
return v0
.end method
.method public filterLeftoverView(Landroid/view/ViewGroup;I)Z
.locals 2
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v0
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-ne v0, v1, :cond_0
const/4 p1, 0x0
return p1
:cond_0
invoke-super {p0, p1, p2}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->filterLeftoverView(Landroid/view/ViewGroup;I)Z
move-result p1
return p1
.end method
.method public flagActionItems()Z
.locals 19
move-object/from16 v0, p0
iget-object v1, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v2, 0x0
if-eqz v1, :cond_0
iget-object v1, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {v1}, Landroidx/appcompat/view/menu/MenuBuilder;->getVisibleItems()Ljava/util/ArrayList;
move-result-object v1
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v3
goto :goto_0
:cond_0
const/4 v1, 0x0
const/4 v3, 0x0
:goto_0
iget v4, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItems:I
iget v5, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionItemWidthLimit:I
invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v6
iget-object v7, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v7, Landroid/view/ViewGroup;
move v11, v4
const/4 v4, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
const/4 v10, 0x0
:goto_1
if-ge v4, v3, :cond_4
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v13
check-cast v13, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {v13}, Landroidx/appcompat/view/menu/MenuItemImpl;->requiresActionButton()Z
move-result v14
if-eqz v14, :cond_1
add-int/lit8 v9, v9, 0x1
goto :goto_2
:cond_1
invoke-virtual {v13}, Landroidx/appcompat/view/menu/MenuItemImpl;->requestsActionButton()Z
move-result v14
if-eqz v14, :cond_2
add-int/lit8 v10, v10, 0x1
goto :goto_2
:cond_2
const/4 v8, 0x1
:goto_2
iget-boolean v12, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mExpandedActionViewsExclusive:Z
if-eqz v12, :cond_3
invoke-virtual {v13}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionViewExpanded()Z
move-result v12
if-eqz v12, :cond_3
const/4 v11, 0x0
:cond_3
add-int/lit8 v4, v4, 0x1
goto :goto_1
:cond_4
iget-boolean v4, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
if-eqz v4, :cond_6
if-nez v8, :cond_5
add-int/2addr v10, v9
if-le v10, v11, :cond_6
:cond_5
add-int/lit8 v11, v11, -0x1
:cond_6
sub-int/2addr v11, v9
iget-object v4, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonGroups:Landroid/util/SparseBooleanArray;
invoke-virtual {v4}, Landroid/util/SparseBooleanArray;->clear()V
iget-boolean v8, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v8, :cond_7
iget v8, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMinCellSize:I
div-int v9, v5, v8
rem-int v10, v5, v8
div-int/2addr v10, v9
add-int/2addr v8, v10
goto :goto_3
:cond_7
const/4 v8, 0x0
const/4 v9, 0x0
:goto_3
move v10, v5
const/4 v5, 0x0
const/4 v13, 0x0
:goto_4
if-ge v5, v3, :cond_1d
invoke-virtual {v1, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v14
check-cast v14, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->requiresActionButton()Z
move-result v15
if-eqz v15, :cond_c
iget-object v15, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
invoke-virtual {v0, v14, v15, v7}, Landroidx/appcompat/widget/ActionMenuPresenter;->getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object v15
iget-object v12, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
if-nez v12, :cond_8
iput-object v15, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
:cond_8
iget-boolean v12, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v12, :cond_9
invoke-static {v15, v8, v9, v6, v2}, Landroidx/appcompat/widget/ActionMenuView;->measureChildForCells(Landroid/view/View;IIII)I
move-result v12
sub-int/2addr v9, v12
goto :goto_5
:cond_9
invoke-virtual {v15, v6, v6}, Landroid/view/View;->measure(II)V
:goto_5
invoke-virtual {v15}, Landroid/view/View;->getMeasuredWidth()I
move-result v12
sub-int/2addr v10, v12
if-nez v13, :cond_a
goto :goto_6
:cond_a
move v12, v13
:goto_6
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->getGroupId()I
move-result v13
if-eqz v13, :cond_b
const/4 v15, 0x1
invoke-virtual {v4, v13, v15}, Landroid/util/SparseBooleanArray;->put(IZ)V
goto :goto_7
:cond_b
const/4 v15, 0x1
:goto_7
invoke-virtual {v14, v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
move/from16 v17, v3
move v13, v12
:goto_8
const/4 v0, 0x0
goto/16 :goto_10
:cond_c
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->requestsActionButton()Z
move-result v12
if-eqz v12, :cond_1c
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->getGroupId()I
move-result v12
invoke-virtual {v4, v12}, Landroid/util/SparseBooleanArray;->get(I)Z
move-result v15
if-gtz v11, :cond_d
if-eqz v15, :cond_f
:cond_d
if-lez v10, :cond_f
iget-boolean v2, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v2, :cond_e
if-lez v9, :cond_f
:cond_e
const/4 v2, 0x1
goto :goto_9
:cond_f
const/4 v2, 0x0
:goto_9
if-eqz v2, :cond_16
move/from16 v16, v2
iget-object v2, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
invoke-virtual {v0, v14, v2, v7}, Landroidx/appcompat/widget/ActionMenuPresenter;->getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object v2
move/from16 v17, v3
iget-object v3, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
if-nez v3, :cond_10
iput-object v2, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
:cond_10
iget-boolean v3, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v3, :cond_11
const/4 v3, 0x0
invoke-static {v2, v8, v9, v6, v3}, Landroidx/appcompat/widget/ActionMenuView;->measureChildForCells(Landroid/view/View;IIII)I
move-result v18
sub-int v9, v9, v18
if-nez v18, :cond_12
const/16 v16, 0x0
goto :goto_a
:cond_11
invoke-virtual {v2, v6, v6}, Landroid/view/View;->measure(II)V
:cond_12
:goto_a
invoke-virtual {v2}, Landroid/view/View;->getMeasuredWidth()I
move-result v2
sub-int/2addr v10, v2
if-nez v13, :cond_13
move v13, v2
:cond_13
iget-boolean v2, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v2, :cond_14
if-ltz v10, :cond_15
goto :goto_b
:cond_14
add-int v2, v10, v13
if-lez v2, :cond_15
:goto_b
const/4 v2, 0x1
goto :goto_c
:cond_15
const/4 v2, 0x0
:goto_c
and-int v2, v16, v2
goto :goto_d
:cond_16
move/from16 v16, v2
move/from16 v17, v3
:goto_d
if-eqz v2, :cond_17
if-eqz v12, :cond_17
const/4 v3, 0x1
invoke-virtual {v4, v12, v3}, Landroid/util/SparseBooleanArray;->put(IZ)V
goto :goto_f
:cond_17
if-eqz v15, :cond_1a
const/4 v3, 0x0
invoke-virtual {v4, v12, v3}, Landroid/util/SparseBooleanArray;->put(IZ)V
const/4 v3, 0x0
:goto_e
if-ge v3, v5, :cond_1a
invoke-virtual {v1, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v15
check-cast v15, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->getGroupId()I
move-result v0
if-ne v0, v12, :cond_19
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionButton()Z
move-result v0
if-eqz v0, :cond_18
add-int/lit8 v11, v11, 0x1
:cond_18
const/4 v0, 0x0
invoke-virtual {v15, v0}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
:cond_19
add-int/lit8 v3, v3, 0x1
move-object/from16 v0, p0
goto :goto_e
:cond_1a
:goto_f
if-eqz v2, :cond_1b
add-int/lit8 v11, v11, -0x1
:cond_1b
invoke-virtual {v14, v2}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
goto/16 :goto_8
:cond_1c
move/from16 v17, v3
const/4 v0, 0x0
invoke-virtual {v14, v0}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
:goto_10
add-int/lit8 v5, v5, 0x1
const/4 v2, 0x0
move-object/from16 v0, p0
move/from16 v3, v17
goto/16 :goto_4
:cond_1d
const/4 v2, 0x1
return v2
.end method
.method public getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.locals 2
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuItemImpl;->getActionView()Landroid/view/View;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuItemImpl;->hasCollapsibleActionView()Z
move-result v1
if-eqz v1, :cond_1
:cond_0
invoke-super {p0, p1, p2, p3}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
:cond_1
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionViewExpanded()Z
move-result p1
if-eqz p1, :cond_2
const/16 p1, 0x8
goto :goto_0
:cond_2
const/4 p1, 0x0
:goto_0
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
check-cast p3, Landroidx/appcompat/widget/ActionMenuView;
invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object p1
invoke-virtual {p3, p1}, Landroidx/appcompat/widget/ActionMenuView;->checkLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Z
move-result p2
if-nez p2, :cond_3
invoke-virtual {p3, p1}, Landroidx/appcompat/widget/ActionMenuView;->generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
invoke-virtual {v0, p1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
:cond_3
return-object v0
.end method
.method public getMenuView(Landroid/view/ViewGroup;)Landroidx/appcompat/view/menu/MenuView;
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
invoke-super {p0, p1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->getMenuView(Landroid/view/ViewGroup;)Landroidx/appcompat/view/menu/MenuView;
move-result-object p1
if-eq v0, p1, :cond_0
move-object v0, p1
check-cast v0, Landroidx/appcompat/widget/ActionMenuView;
invoke-virtual {v0, p0}, Landroidx/appcompat/widget/ActionMenuView;->setPresenter(Landroidx/appcompat/widget/ActionMenuPresenter;)V
:cond_0
return-object p1
.end method
.method public getOverflowIcon()Landroid/graphics/drawable/Drawable;
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v0
return-object v0
:cond_0
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
if-eqz v0, :cond_1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
return-object v0
:cond_1
const/4 v0, 0x0
return-object v0
.end method
.method public hideOverflowMenu()Z
.locals 3
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
const/4 v1, 0x1
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v0, Landroid/view/View;
iget-object v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
invoke-virtual {v0, v2}, Landroid/view/View;->removeCallbacks(Ljava/lang/Runnable;)Z
const/4 v0, 0x0
iput-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
return v1
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowPopup:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;
if-eqz v0, :cond_1
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->dismiss()V
return v1
:cond_1
const/4 v0, 0x0
return v0
.end method
.method public hideSubMenus()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;->dismiss()V
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public initForMenu(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;)V
.locals 4
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/appcompat/view/menu/MenuBuilder;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-super {p0, p1, p2}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->initForMenu(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;)V
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object p2
invoke-static {p1}, Landroidx/appcompat/view/ActionBarPolicy;->get(Landroid/content/Context;)Landroidx/appcompat/view/ActionBarPolicy;
move-result-object p1
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflowSet:Z
if-nez v0, :cond_0
invoke-virtual {p1}, Landroidx/appcompat/view/ActionBarPolicy;->showsOverflowMenuButton()Z
move-result v0
iput-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
:cond_0
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mWidthLimitSet:Z
if-nez v0, :cond_1
invoke-virtual {p1}, Landroidx/appcompat/view/ActionBarPolicy;->getEmbeddedMenuWidthLimit()I
move-result v0
iput v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mWidthLimit:I
:cond_1
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItemsSet:Z
if-nez v0, :cond_2
invoke-virtual {p1}, Landroidx/appcompat/view/ActionBarPolicy;->getMaxActionButtons()I
move-result p1
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItems:I
:cond_2
iget p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mWidthLimit:I
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
const/4 v1, 0x0
if-eqz v0, :cond_5
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-nez v0, :cond_4
new-instance v0, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
iget-object v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mSystemContext:Landroid/content/Context;
invoke-direct {v0, p0, v2}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;Landroid/content/Context;)V
iput-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
const/4 v2, 0x0
if-eqz v0, :cond_3
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
iget-object v3, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
iput-boolean v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
:cond_3
invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v0
iget-object v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {v2, v0, v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->measure(II)V
:cond_4
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->getMeasuredWidth()I
move-result v0
sub-int/2addr p1, v0
goto :goto_0
:cond_5
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
:goto_0
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionItemWidthLimit:I
const/high16 p1, 0x42600000 # 56.0f
invoke-virtual {p2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object p2
iget p2, p2, Landroid/util/DisplayMetrics;->density:F
mul-float p2, p2, p1
float-to-int p1, p2
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMinCellSize:I
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mScrapActionButtonView:Landroid/view/View;
return-void
.end method
.method public isOverflowMenuShowPending()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
if-nez v0, :cond_1
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
return v0
:cond_1
:goto_0
const/4 v0, 0x1
return v0
.end method
.method public isOverflowMenuShowing()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowPopup:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;->isShowing()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public isOverflowReserved()Z
.locals 1
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
return v0
.end method
.method public onCloseMenu(Landroidx/appcompat/view/menu/MenuBuilder;Z)V
.locals 0
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->dismissPopupMenus()Z
invoke-super {p0, p1, p2}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->onCloseMenu(Landroidx/appcompat/view/menu/MenuBuilder;Z)V
return-void
.end method
.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 1
iget-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItemsSet:Z
if-nez p1, :cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mContext:Landroid/content/Context;
invoke-static {p1}, Landroidx/appcompat/view/ActionBarPolicy;->get(Landroid/content/Context;)Landroidx/appcompat/view/ActionBarPolicy;
move-result-object p1
invoke-virtual {p1}, Landroidx/appcompat/view/ActionBarPolicy;->getMaxActionButtons()I
move-result p1
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItems:I
:cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_1
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v0, 0x1
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;->onItemsChanged(Z)V
:cond_1
return-void
.end method
.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
.locals 1
instance-of v0, p1, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;
if-nez v0, :cond_0
return-void
:cond_0
check-cast p1, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;
iget v0, p1, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;->openSubMenuId:I
if-lez v0, :cond_1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
iget p1, p1, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;->openSubMenuId:I
invoke-virtual {v0, p1}, Landroidx/appcompat/view/menu/MenuBuilder;->findItem(I)Landroid/view/MenuItem;
move-result-object p1
if-eqz p1, :cond_1
invoke-interface {p1}, Landroid/view/MenuItem;->getSubMenu()Landroid/view/SubMenu;
move-result-object p1
check-cast p1, Landroidx/appcompat/view/menu/SubMenuBuilder;
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
:cond_1
return-void
.end method
.method public onSaveInstanceState()Landroid/os/Parcelable;
.locals 2
new-instance v0, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;
invoke-direct {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;-><init>()V
iget v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOpenSubMenuId:I
iput v1, v0, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;->openSubMenuId:I
return-object v0
.end method
.method public onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
.locals 7
invoke-virtual {p1}, Landroidx/appcompat/view/menu/SubMenuBuilder;->hasVisibleItems()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
move-object v0, p1
:goto_0
invoke-virtual {v0}, Landroidx/appcompat/view/menu/SubMenuBuilder;->getParentMenu()Landroid/view/Menu;
move-result-object v2
iget-object v3, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eq v2, v3, :cond_1
invoke-virtual {v0}, Landroidx/appcompat/view/menu/SubMenuBuilder;->getParentMenu()Landroid/view/Menu;
move-result-object v0
check-cast v0, Landroidx/appcompat/view/menu/SubMenuBuilder;
goto :goto_0
:cond_1
invoke-virtual {v0}, Landroidx/appcompat/view/menu/SubMenuBuilder;->getItem()Landroid/view/MenuItem;
move-result-object v0
invoke-direct {p0, v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->findViewForItem(Landroid/view/MenuItem;)Landroid/view/View;
move-result-object v0
if-nez v0, :cond_2
return v1
:cond_2
invoke-virtual {p1}, Landroidx/appcompat/view/menu/SubMenuBuilder;->getItem()Landroid/view/MenuItem;
move-result-object v2
invoke-interface {v2}, Landroid/view/MenuItem;->getItemId()I
move-result v2
iput v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOpenSubMenuId:I
invoke-virtual {p1}, Landroidx/appcompat/view/menu/SubMenuBuilder;->size()I
move-result v2
const/4 v3, 0x0
:goto_1
const/4 v4, 0x1
if-ge v3, v2, :cond_4
invoke-virtual {p1, v3}, Landroidx/appcompat/view/menu/SubMenuBuilder;->getItem(I)Landroid/view/MenuItem;
move-result-object v5
invoke-interface {v5}, Landroid/view/MenuItem;->isVisible()Z
move-result v6
if-eqz v6, :cond_3
invoke-interface {v5}, Landroid/view/MenuItem;->getIcon()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_3
const/4 v1, 0x1
goto :goto_2
:cond_3
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_4
:goto_2
new-instance v2, Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
iget-object v3, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mContext:Landroid/content/Context;
invoke-direct {v2, p0, v3, p1, v0}, Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;Landroid/content/Context;Landroidx/appcompat/view/menu/SubMenuBuilder;Landroid/view/View;)V
iput-object v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
invoke-virtual {v0, v1}, Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;->setForceShowIcon(Z)V
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;->show()V
invoke-super {p0, p1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
return v4
.end method
.method public onSubUiVisibilityChanged(Z)V
.locals 1
if-eqz p1, :cond_0
const/4 p1, 0x0
invoke-super {p0, p1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
return-void
:cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_1
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;->close(Z)V
:cond_1
return-void
.end method
.method public setExpandedActionViewsExclusive(Z)V
.locals 0
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mExpandedActionViewsExclusive:Z
return-void
.end method
.method public setItemLimit(I)V
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItems:I
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItemsSet:Z
return-void
.end method
.method public setMenuView(Landroidx/appcompat/widget/ActionMenuView;)V
.locals 1
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {p1, v0}, Landroidx/appcompat/widget/ActionMenuView;->initialize(Landroidx/appcompat/view/menu/MenuBuilder;)V
return-void
.end method
.method public setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
return-void
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
return-void
.end method
.method public setReserveOverflow(Z)V
.locals 0
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflowSet:Z
return-void
.end method
.method public setWidthLimit(IZ)V
.locals 0
iput p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mWidthLimit:I
iput-boolean p2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mWidthLimitSet:Z
return-void
.end method
.method public shouldIncludeItem(ILandroidx/appcompat/view/menu/MenuItemImpl;)Z
.locals 0
invoke-virtual {p2}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionButton()Z
move-result p1
return p1
.end method
.method public showOverflowMenu()Z
.locals 7
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
move-result v0
if-nez v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
if-nez v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuBuilder;->getNonActionItems()Ljava/util/ArrayList;
move-result-object v0
invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z
move-result v0
if-nez v0, :cond_0
new-instance v0, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;
iget-object v3, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mContext:Landroid/content/Context;
iget-object v4, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
iget-object v5, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
const/4 v6, 0x1
move-object v1, v0
move-object v2, p0
invoke-direct/range {v1 .. v6}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/View;Z)V
new-instance v1, Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
invoke-direct {v1, p0, v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;)V
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v0, Landroid/view/View;
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
invoke-virtual {v0, v1}, Landroid/view/View;->post(Ljava/lang/Runnable;)Z
const/4 v0, 0x0
invoke-super {p0, v0}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public updateMenuView(Z)V
.locals 4
invoke-super {p0, p1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->updateMenuView(Z)V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast p1, Landroid/view/View;
invoke-virtual {p1}, Landroid/view/View;->requestLayout()V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v0, 0x0
if-eqz p1, :cond_1
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuBuilder;->getActionItems()Ljava/util/ArrayList;
move-result-object p1
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
invoke-virtual {p1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {v3}, Landroidx/appcompat/view/menu/MenuItemImpl;->getSupportActionProvider()Landroidx/core/view/ActionProvider;
move-result-object v3
if-eqz v3, :cond_0
invoke-virtual {v3, p0}, Landroidx/core/view/ActionProvider;->setSubUiVisibilityListener(Landroidx/core/view/ActionProvider$SubUiVisibilityListener;)V
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_2
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuBuilder;->getNonActionItems()Ljava/util/ArrayList;
move-result-object p1
goto :goto_1
:cond_2
const/4 p1, 0x0
:goto_1
iget-boolean v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
if-eqz v1, :cond_4
if-eqz p1, :cond_4
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result v1
const/4 v2, 0x1
if-ne v1, v2, :cond_3
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionViewExpanded()Z
move-result p1
xor-int/lit8 v0, p1, 0x1
goto :goto_2
:cond_3
if-lez v1, :cond_4
const/4 v0, 0x1
:cond_4
:goto_2
if-eqz v0, :cond_7
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-nez p1, :cond_5
new-instance p1, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mSystemContext:Landroid/content/Context;
invoke-direct {p1, p0, v0}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;-><init>(Landroidx/appcompat/widget/ActionMenuPresenter;Landroid/content/Context;)V
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
:cond_5
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->getParent()Landroid/view/ViewParent;
move-result-object p1
check-cast p1, Landroid/view/ViewGroup;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-eq p1, v0, :cond_8
if-eqz p1, :cond_6
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_6
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast p1, Landroidx/appcompat/widget/ActionMenuView;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuView;->generateOverflowButtonLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object v1
invoke-virtual {p1, v0, v1}, Landroidx/appcompat/widget/ActionMenuView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
goto :goto_3
:cond_7
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
if-eqz p1, :cond_8
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;->getParent()Landroid/view/ViewParent;
move-result-object p1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-ne p1, v0, :cond_8
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast p1, Landroid/view/ViewGroup;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_8
:goto_3
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast p1, Landroidx/appcompat/widget/ActionMenuView;
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
invoke-virtual {p1, v0}, Landroidx/appcompat/widget/ActionMenuView;->setOverflowReserved(Z)V
return-void
.end method