487 lines
12 KiB
Smali
487 lines
12 KiB
Smali
.class public Landroidx/appcompat/view/menu/b;
|
|
.super Ljava/lang/Object;
|
|
.source "ListMenuPresenter.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/appcompat/view/menu/i;
|
|
.implements Landroid/widget/AdapterView$OnItemClickListener;
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/appcompat/view/menu/b$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final k:Ljava/lang/String; = "ListMenuPresenter"
|
|
|
|
.field public static final l:Ljava/lang/String; = "android:menu:list"
|
|
|
|
|
|
# instance fields
|
|
.field public a:Landroid/content/Context;
|
|
|
|
.field public b:Landroid/view/LayoutInflater;
|
|
|
|
.field public c:Landroidx/appcompat/view/menu/d;
|
|
|
|
.field public d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
.field public e:I
|
|
|
|
.field public f:I
|
|
|
|
.field public g:I
|
|
|
|
.field public h:Landroidx/appcompat/view/menu/i$a;
|
|
|
|
.field public i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
.field public j:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(II)V
|
|
.locals 0
|
|
|
|
.line 4
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 5
|
|
iput p1, p0, Landroidx/appcompat/view/menu/b;->g:I
|
|
|
|
.line 6
|
|
iput p2, p0, Landroidx/appcompat/view/menu/b;->f:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;I)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p2, v0}, Landroidx/appcompat/view/menu/b;-><init>(II)V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->a:Landroid/content/Context;
|
|
|
|
.line 3
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->b:Landroid/view/LayoutInflater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Landroid/widget/ListAdapter;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
new-instance v0, Landroidx/appcompat/view/menu/b$a;
|
|
|
|
invoke-direct {v0, p0}, Landroidx/appcompat/view/menu/b$a;-><init>(Landroidx/appcompat/view/menu/b;)V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public b()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Landroidx/appcompat/view/menu/b;->e:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public c(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
const-string v0, "android:menu:list"
|
|
|
|
.line 1
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getSparseParcelableArray(Ljava/lang/String;)Landroid/util/SparseArray;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->restoreHierarchyState(Landroid/util/SparseArray;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public collapseItemActionView(Landroidx/appcompat/view/menu/d;Landroidx/appcompat/view/menu/g;)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public d(Landroid/os/Bundle;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Landroid/util/SparseArray;
|
|
|
|
invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V
|
|
|
|
.line 2
|
|
iget-object v1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->saveHierarchyState(Landroid/util/SparseArray;)V
|
|
|
|
:cond_0
|
|
const-string v1, "android:menu:list"
|
|
|
|
.line 4
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putSparseParcelableArray(Ljava/lang/String;Landroid/util/SparseArray;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public e(I)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput p1, p0, Landroidx/appcompat/view/menu/b;->j:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public expandItemActionView(Landroidx/appcompat/view/menu/d;Landroidx/appcompat/view/menu/g;)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public f(I)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput p1, p0, Landroidx/appcompat/view/menu/b;->e:I
|
|
|
|
.line 2
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/view/menu/b;->updateMenuView(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public flagActionItems()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getId()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Landroidx/appcompat/view/menu/b;->j:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getMenuView(Landroid/view/ViewGroup;)Landroidx/appcompat/view/menu/j;
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->b:Landroid/view/LayoutInflater;
|
|
|
|
sget v1, Landroidx/appcompat/R$layout;->abc_expanded_menu_layout:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v1, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
.line 3
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 4
|
|
new-instance p1, Landroidx/appcompat/view/menu/b$a;
|
|
|
|
invoke-direct {p1, p0}, Landroidx/appcompat/view/menu/b$a;-><init>(Landroidx/appcompat/view/menu/b;)V
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
.line 5
|
|
:cond_0
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V
|
|
|
|
.line 6
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
invoke-virtual {p1, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
|
|
|
|
.line 7
|
|
:cond_1
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public initForMenu(Landroid/content/Context;Landroidx/appcompat/view/menu/d;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget v0, p0, Landroidx/appcompat/view/menu/b;->f:I
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
new-instance v0, Landroid/view/ContextThemeWrapper;
|
|
|
|
iget v1, p0, Landroidx/appcompat/view/menu/b;->f:I
|
|
|
|
invoke-direct {v0, p1, v1}, Landroid/view/ContextThemeWrapper;-><init>(Landroid/content/Context;I)V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/view/menu/b;->a:Landroid/content/Context;
|
|
|
|
.line 3
|
|
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->b:Landroid/view/LayoutInflater;
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->a:Landroid/content/Context;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 5
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->a:Landroid/content/Context;
|
|
|
|
.line 6
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->b:Landroid/view/LayoutInflater;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 7
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->b:Landroid/view/LayoutInflater;
|
|
|
|
.line 8
|
|
:cond_1
|
|
:goto_0
|
|
iput-object p2, p0, Landroidx/appcompat/view/menu/b;->c:Landroidx/appcompat/view/menu/d;
|
|
|
|
.line 9
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 10
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/b$a;->notifyDataSetChanged()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCloseMenu(Landroidx/appcompat/view/menu/d;Z)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->h:Landroidx/appcompat/view/menu/i$a;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-interface {v0, p1, p2}, Landroidx/appcompat/view/menu/i$a;->onCloseMenu(Landroidx/appcompat/view/menu/d;Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/AdapterView<",
|
|
"*>;",
|
|
"Landroid/view/View;",
|
|
"IJ)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->c:Landroidx/appcompat/view/menu/d;
|
|
|
|
iget-object p2, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
invoke-virtual {p2, p3}, Landroidx/appcompat/view/menu/b$a;->b(I)Landroidx/appcompat/view/menu/g;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-virtual {p1, p2, p0, p3}, Landroidx/appcompat/view/menu/d;->performItemAction(Landroid/view/MenuItem;Landroidx/appcompat/view/menu/i;I)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
check-cast p1, Landroid/os/Bundle;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/view/menu/b;->c(Landroid/os/Bundle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSaveInstanceState()Landroid/os/Parcelable;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->d:Landroidx/appcompat/view/menu/ExpandedMenuView;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Landroidx/appcompat/view/menu/b;->d(Landroid/os/Bundle;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onSubMenuSelected(Landroidx/appcompat/view/menu/l;)Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/d;->hasVisibleItems()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Landroidx/appcompat/view/menu/e;
|
|
|
|
invoke-direct {v0, p1}, Landroidx/appcompat/view/menu/e;-><init>(Landroidx/appcompat/view/menu/d;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/e;->d(Landroid/os/IBinder;)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Landroidx/appcompat/view/menu/b;->h:Landroidx/appcompat/view/menu/i$a;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 4
|
|
invoke-interface {v0, p1}, Landroidx/appcompat/view/menu/i$a;->a(Landroidx/appcompat/view/menu/d;)Z
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public setCallback(Landroidx/appcompat/view/menu/i$a;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Landroidx/appcompat/view/menu/b;->h:Landroidx/appcompat/view/menu/i$a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public updateMenuView(Z)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p1, p0, Landroidx/appcompat/view/menu/b;->i:Landroidx/appcompat/view/menu/b$a;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/b$a;->notifyDataSetChanged()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|