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

1634 lines
45 KiB
Smali
Raw Normal View History

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