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

1614 lines
45 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public 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 public static final TAG:Ljava/lang/String; = "ActionMenuPresenter"
# instance fields
.field public final mActionButtonGroups:Landroid/util/SparseBooleanArray;
.field public mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
.field public mActionItemWidthLimit:I
.field public mExpandedActionViewsExclusive:Z
.field public mMaxItems:I
.field public mMaxItemsSet:Z
.field public mMinCellSize:I
.field public mOpenSubMenuId:I
.field public mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
.field public mOverflowPopup:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowPopup;
.field public mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
.field public mPendingOverflowIconSet:Z
.field public mPopupCallback:Landroidx/appcompat/widget/ActionMenuPresenter$ActionMenuPopupCallback;
.field public final mPopupPresenterCallback:Landroidx/appcompat/widget/ActionMenuPresenter$PopupPresenterCallback;
.field public mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
.field public mReserveOverflow:Z
.field public mReserveOverflowSet:Z
.field public mStrictWidthLimit:Z
.field public mWidthLimit:I
.field public 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 public static synthetic access$000(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method public static synthetic access$100(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method public static synthetic access$200(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuView;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
return-object p0
.end method
.method public static synthetic access$300(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method public static synthetic access$400(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuBuilder;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object p0
.end method
.method public static synthetic access$500(Landroidx/appcompat/widget/ActionMenuPresenter;)Landroidx/appcompat/view/menu/MenuView;
.locals 0
iget-object p0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->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 20
move-object/from16 v0, p0
iget-object v1, v0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v2, 0x0
const/4 v3, 0x0
if-eqz v1, :cond_0
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 v4
goto :goto_0
:cond_0
move-object v1, v2
const/4 v4, 0x0
:goto_0
iget v5, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMaxItems:I
iget v6, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionItemWidthLimit:I
invoke-static {v3, v3}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v7
iget-object v8, v0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v8, Landroid/view/ViewGroup;
const/4 v9, 0x0
const/4 v10, 0x0
const/4 v11, 0x0
2020-07-08 16:44:49 +00:00
const/4 v12, 0x0
2020-05-17 12:40:10 +00:00
:goto_1
2020-07-08 16:44:49 +00:00
if-ge v9, v4, :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v9}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
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_1
2020-07-08 16:44:49 +00:00
add-int/lit8 v11, v11, 0x1
2020-05-17 12:40:10 +00:00
goto :goto_2
:cond_1
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->requestsActionButton()Z
move-result v15
if-eqz v15, :cond_2
2020-07-08 16:44:49 +00:00
add-int/lit8 v12, v12, 0x1
2020-05-17 12:40:10 +00:00
goto :goto_2
:cond_2
2020-07-08 16:44:49 +00:00
const/4 v10, 0x1
2020-05-17 12:40:10 +00:00
:goto_2
iget-boolean v13, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mExpandedActionViewsExclusive:Z
if-eqz v13, :cond_3
invoke-virtual {v14}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionViewExpanded()Z
move-result v13
if-eqz v13, :cond_3
2020-07-08 16:44:49 +00:00
const/4 v5, 0x0
2020-05-17 12:40:10 +00:00
:cond_3
2020-07-08 16:44:49 +00:00
add-int/lit8 v9, v9, 0x1
2020-05-17 12:40:10 +00:00
goto :goto_1
:cond_4
2020-07-08 16:44:49 +00:00
iget-boolean v9, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mReserveOverflow:Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v9, :cond_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v10, :cond_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
add-int/2addr v12, v11
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-le v12, v5, :cond_6
2020-05-17 12:40:10 +00:00
:cond_5
2020-07-08 16:44:49 +00:00
add-int/lit8 v5, v5, -0x1
2020-05-17 12:40:10 +00:00
:cond_6
2020-07-08 16:44:49 +00:00
sub-int/2addr v5, v11
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v9, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonGroups:Landroid/util/SparseBooleanArray;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v9}, Landroid/util/SparseBooleanArray;->clear()V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-boolean v10, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v10, :cond_7
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget v10, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mMinCellSize:I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
div-int v11, v6, v10
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
rem-int v12, v6, v10
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
div-int/2addr v12, v11
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
add-int/2addr v12, v10
2020-05-17 12:40:10 +00:00
goto :goto_3
:cond_7
2020-07-08 16:44:49 +00:00
const/4 v11, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v12, 0x0
2020-05-17 12:40:10 +00:00
:goto_3
2020-07-08 16:44:49 +00:00
const/4 v10, 0x0
2020-05-17 12:40:10 +00:00
const/4 v14, 0x0
:goto_4
2020-07-08 16:44:49 +00:00
if-ge v10, v4, :cond_1b
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v10}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
move-result-object v15
check-cast v15, Landroidx/appcompat/view/menu/MenuItemImpl;
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->requiresActionButton()Z
move-result v16
if-eqz v16, :cond_b
invoke-virtual {v0, v15, v2, v8}, Landroidx/appcompat/widget/ActionMenuPresenter;->getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object v13
iget-boolean v2, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v2, :cond_8
2020-07-08 16:44:49 +00:00
invoke-static {v13, v12, v11, v7, v3}, Landroidx/appcompat/widget/ActionMenuView;->measureChildForCells(Landroid/view/View;IIII)I
2020-05-17 12:40:10 +00:00
move-result v2
2020-07-08 16:44:49 +00:00
sub-int/2addr v11, v2
2020-05-17 12:40:10 +00:00
goto :goto_5
:cond_8
invoke-virtual {v13, v7, v7}, Landroid/view/View;->measure(II)V
:goto_5
invoke-virtual {v13}, Landroid/view/View;->getMeasuredWidth()I
move-result v2
2020-07-08 16:44:49 +00:00
sub-int/2addr v6, v2
2020-05-17 12:40:10 +00:00
if-nez v14, :cond_9
2020-07-08 16:44:49 +00:00
move v14, v2
2020-05-17 12:40:10 +00:00
:cond_9
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->getGroupId()I
2020-07-08 16:44:49 +00:00
move-result v2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v13, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v2, :cond_a
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v9, v2, v13}, Landroid/util/SparseBooleanArray;->put(IZ)V
2020-05-17 12:40:10 +00:00
:cond_a
2020-07-08 16:44:49 +00:00
invoke-virtual {v15, v13}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
2020-05-17 12:40:10 +00:00
move/from16 v17, v4
2020-07-08 16:44:49 +00:00
:goto_6
2020-05-17 12:40:10 +00:00
const/4 v0, 0x0
2020-07-08 16:44:49 +00:00
goto/16 :goto_d
2020-05-17 12:40:10 +00:00
:cond_b
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->requestsActionButton()Z
move-result v2
if-eqz v2, :cond_1a
invoke-virtual {v15}, Landroidx/appcompat/view/menu/MenuItemImpl;->getGroupId()I
move-result v2
2020-07-08 16:44:49 +00:00
invoke-virtual {v9, v2}, Landroid/util/SparseBooleanArray;->get(I)Z
2020-05-17 12:40:10 +00:00
move-result v13
2020-07-08 16:44:49 +00:00
if-gtz v5, :cond_c
2020-05-17 12:40:10 +00:00
if-eqz v13, :cond_e
:cond_c
2020-07-08 16:44:49 +00:00
if-lez v6, :cond_e
2020-05-17 12:40:10 +00:00
iget-boolean v3, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
if-eqz v3, :cond_d
2020-07-08 16:44:49 +00:00
if-lez v11, :cond_e
2020-05-17 12:40:10 +00:00
:cond_d
const/4 v3, 0x1
2020-07-08 16:44:49 +00:00
goto :goto_7
2020-05-17 12:40:10 +00:00
:cond_e
const/4 v3, 0x0
2020-07-08 16:44:49 +00:00
:goto_7
2020-05-17 12:40:10 +00:00
move/from16 v18, v3
move/from16 v17, v4
if-eqz v3, :cond_14
const/4 v3, 0x0
invoke-virtual {v0, v15, v3, v8}, Landroidx/appcompat/widget/ActionMenuPresenter;->getItemView(Landroidx/appcompat/view/menu/MenuItemImpl;Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
iget-boolean v3, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
2020-07-08 16:44:49 +00:00
if-eqz v3, :cond_f
2020-05-17 12:40:10 +00:00
const/4 v3, 0x0
2020-07-08 16:44:49 +00:00
invoke-static {v4, v12, v11, v7, v3}, Landroidx/appcompat/widget/ActionMenuView;->measureChildForCells(Landroid/view/View;IIII)I
2020-05-17 12:40:10 +00:00
move-result v19
2020-07-08 16:44:49 +00:00
sub-int v11, v11, v19
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v19, :cond_10
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/16 v18, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_8
2020-05-17 12:40:10 +00:00
:cond_f
2020-07-08 16:44:49 +00:00
invoke-virtual {v4, v7, v7}, Landroid/view/View;->measure(II)V
2020-05-17 12:40:10 +00:00
:cond_10
2020-07-08 16:44:49 +00:00
:goto_8
move/from16 v3, v18
2020-05-17 12:40:10 +00:00
invoke-virtual {v4}, Landroid/view/View;->getMeasuredWidth()I
2020-07-08 16:44:49 +00:00
move-result v4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
sub-int/2addr v6, v4
2020-05-17 12:40:10 +00:00
if-nez v14, :cond_11
2020-07-08 16:44:49 +00:00
move v14, v4
2020-05-17 12:40:10 +00:00
:cond_11
2020-07-08 16:44:49 +00:00
iget-boolean v4, v0, Landroidx/appcompat/widget/ActionMenuPresenter;->mStrictWidthLimit:Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v4, :cond_12
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-ltz v6, :cond_13
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_9
2020-05-17 12:40:10 +00:00
:cond_12
2020-07-08 16:44:49 +00:00
add-int v4, v6, v14
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-lez v4, :cond_13
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_9
const/4 v4, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_a
2020-05-17 12:40:10 +00:00
:cond_13
2020-07-08 16:44:49 +00:00
const/4 v4, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_a
and-int/2addr v3, v4
2020-05-17 12:40:10 +00:00
:cond_14
if-eqz v3, :cond_15
if-eqz v2, :cond_15
const/4 v4, 0x1
2020-07-08 16:44:49 +00:00
invoke-virtual {v9, v2, v4}, Landroid/util/SparseBooleanArray;->put(IZ)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_c
2020-05-17 12:40:10 +00:00
:cond_15
if-eqz v13, :cond_18
const/4 v4, 0x0
2020-07-08 16:44:49 +00:00
invoke-virtual {v9, v2, v4}, Landroid/util/SparseBooleanArray;->put(IZ)V
2020-05-17 12:40:10 +00:00
const/4 v4, 0x0
2020-07-08 16:44:49 +00:00
:goto_b
if-ge v4, v10, :cond_18
2020-05-17 12:40:10 +00:00
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;->getGroupId()I
move-result v0
if-ne v0, v2, :cond_17
invoke-virtual {v13}, Landroidx/appcompat/view/menu/MenuItemImpl;->isActionButton()Z
move-result v0
if-eqz v0, :cond_16
2020-07-08 16:44:49 +00:00
add-int/lit8 v5, v5, 0x1
2020-05-17 12:40:10 +00:00
:cond_16
const/4 v0, 0x0
invoke-virtual {v13, v0}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
:cond_17
add-int/lit8 v4, v4, 0x1
move-object/from16 v0, p0
2020-07-08 16:44:49 +00:00
goto :goto_b
2020-05-17 12:40:10 +00:00
:cond_18
2020-07-08 16:44:49 +00:00
:goto_c
2020-05-17 12:40:10 +00:00
if-eqz v3, :cond_19
2020-07-08 16:44:49 +00:00
add-int/lit8 v5, v5, -0x1
2020-05-17 12:40:10 +00:00
:cond_19
invoke-virtual {v15, v3}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
2020-07-08 16:44:49 +00:00
goto/16 :goto_6
2020-05-17 12:40:10 +00:00
:cond_1a
move/from16 v17, v4
const/4 v0, 0x0
invoke-virtual {v15, v0}, Landroidx/appcompat/view/menu/MenuItemImpl;->setIsActionButton(Z)V
2020-07-08 16:44:49 +00:00
:goto_d
add-int/lit8 v10, v10, 0x1
2020-05-17 12:40:10 +00:00
const/4 v2, 0x0
move-object/from16 v0, p0
2020-07-08 16:44:49 +00:00
move/from16 v4, v17
const/4 v3, 0x0
2020-05-17 12:40:10 +00:00
goto/16 :goto_4
:cond_1b
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/view/menu/BaseMenuPresenter;->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}, Landroid/widget/ImageView;->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 v2, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-eqz v2, :cond_0
check-cast v2, Landroid/view/View;
invoke-virtual {v2, v0}, 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/view/menu/MenuPopupHelper;->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/view/menu/BaseMenuPresenter;->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;
2020-07-08 16:44:49 +00:00
iget-boolean v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v3, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v2, :cond_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
2020-05-17 12:40:10 +00:00
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIcon:Landroid/graphics/drawable/Drawable;
2020-07-08 16:44:49 +00:00
iput-boolean v3, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPendingOverflowIconSet:Z
2020-05-17 12:40:10 +00:00
:cond_3
2020-07-08 16:44:49 +00:00
invoke-static {v3, v3}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
2020-05-17 12:40:10 +00:00
move-result v0
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {v1, v0, v0}, Landroid/widget/ImageView;->measure(II)V
:cond_4
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {v0}, Landroid/widget/ImageView;->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
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
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
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/view/menu/MenuPopupHelper;->isShowing()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
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/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_1
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 p1, p1, Landroidx/appcompat/widget/ActionMenuPresenter$SavedState;->openSubMenuId:I
if-lez p1, :cond_1
iget-object v0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
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/MenuBuilder;->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/view/menu/BaseMenuPresenter;->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/MenuBuilder;->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/MenuBuilder;->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/view/menu/BaseMenuPresenter;->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;
2020-07-08 16:44:49 +00:00
invoke-virtual {v2, v1}, Landroidx/appcompat/view/menu/MenuPopupHelper;->setForceShowIcon(Z)V
2020-05-17 12:40:10 +00:00
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mActionButtonPopup:Landroidx/appcompat/widget/ActionMenuPresenter$ActionButtonSubmenu;
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->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
goto :goto_0
:cond_0
iget-object p1, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_1
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;->close(Z)V
:cond_1
:goto_0
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/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
iget-object v0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->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/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
: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;
:goto_0
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/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-eqz v1, :cond_0
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mPostedOpenRunnable:Landroidx/appcompat/widget/ActionMenuPresenter$OpenOverflowRunnable;
if-nez v1, :cond_0
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/view/menu/BaseMenuPresenter;->mContext:Landroid/content/Context;
iget-object v4, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
check-cast v0, Landroid/view/View;
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/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v0, 0x0
if-eqz p1, :cond_1
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/view/menu/BaseMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz p1, :cond_2
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/view/menu/BaseMenuPresenter;->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}, Landroid/widget/ImageView;->getParent()Landroid/view/ViewParent;
move-result-object p1
check-cast p1, Landroid/view/ViewGroup;
iget-object v0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->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/view/menu/BaseMenuPresenter;->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}, Landroid/view/ViewGroup;->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}, Landroid/widget/ImageView;->getParent()Landroid/view/ViewParent;
move-result-object p1
iget-object v0, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/MenuView;
if-ne p1, v0, :cond_8
check-cast v0, Landroid/view/ViewGroup;
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuPresenter;->mOverflowButton:Landroidx/appcompat/widget/ActionMenuPresenter$OverflowMenuButton;
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_8
:goto_3
iget-object p1, p0, Landroidx/appcompat/view/menu/BaseMenuPresenter;->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