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

252 lines
7.2 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/appcompat/widget/MenuPopupWindow;
.super Landroidx/appcompat/widget/ListPopupWindow;
.source "MenuPopupWindow.java"
# interfaces
.implements Landroidx/appcompat/widget/MenuItemHoverListener;
# 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/widget/MenuPopupWindow$MenuDropDownListView;
}
.end annotation
# static fields
.field public static final TAG:Ljava/lang/String; = "MenuPopupWindow"
.field public static sSetTouchModalMethod:Ljava/lang/reflect/Method;
# instance fields
.field public mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
# direct methods
.method public static constructor <clinit>()V
2020-07-08 16:44:49 +00:00
.locals 5
2020-05-17 12:40:10 +00:00
:try_start_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
if-gt v0, v1, :cond_0
const-class v0, Landroid/widget/PopupWindow;
2020-07-08 16:44:49 +00:00
const-string v1, "setTouchModal"
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v2, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-array v2, v2, [Ljava/lang/Class;
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
sget-object v4, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
aput-object v4, v2, v3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
2020-05-17 12:40:10 +00:00
move-result-object v0
sput-object v0, Landroidx/appcompat/widget/MenuPopupWindow;->sSetTouchModalMethod:Ljava/lang/reflect/Method;
2020-07-08 16:44:49 +00:00
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
2020-05-17 12:40:10 +00:00
goto :goto_0
:catch_0
const-string v0, "MenuPopupWindow"
const-string v1, "Could not find method setTouchModal() on PopupWindow. Oh well."
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
:goto_0
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
.locals 0
2020-09-09 19:21:20 +00:00
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2020-05-17 12:40:10 +00:00
invoke-direct {p0, p1, p2, p3, p4}, Landroidx/appcompat/widget/ListPopupWindow;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
return-void
.end method
# virtual methods
.method public createDropDownListView(Landroid/content/Context;Z)Landroidx/appcompat/widget/DropDownListView;
.locals 1
2020-09-09 19:21:20 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2020-05-17 12:40:10 +00:00
new-instance v0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;
invoke-direct {v0, p1, p2}, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;-><init>(Landroid/content/Context;Z)V
invoke-virtual {v0, p0}, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->setHoverListener(Landroidx/appcompat/widget/MenuItemHoverListener;)V
return-object v0
.end method
.method public onItemHoverEnter(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
.locals 1
.param p1 # Landroidx/appcompat/view/menu/MenuBuilder;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/MenuItem;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/appcompat/widget/MenuPopupWindow;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
if-eqz v0, :cond_0
invoke-interface {v0, p1, p2}, Landroidx/appcompat/widget/MenuItemHoverListener;->onItemHoverEnter(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
:cond_0
return-void
.end method
.method public onItemHoverExit(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
.locals 1
.param p1 # Landroidx/appcompat/view/menu/MenuBuilder;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/MenuItem;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/appcompat/widget/MenuPopupWindow;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
if-eqz v0, :cond_0
invoke-interface {v0, p1, p2}, Landroidx/appcompat/widget/MenuItemHoverListener;->onItemHoverExit(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
:cond_0
return-void
.end method
.method public setEnterTransition(Ljava/lang/Object;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
check-cast p1, Landroid/transition/Transition;
invoke-virtual {v0, p1}, Landroid/widget/PopupWindow;->setEnterTransition(Landroid/transition/Transition;)V
:cond_0
return-void
.end method
.method public setExitTransition(Ljava/lang/Object;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
check-cast p1, Landroid/transition/Transition;
invoke-virtual {v0, p1}, Landroid/widget/PopupWindow;->setExitTransition(Landroid/transition/Transition;)V
:cond_0
return-void
.end method
.method public setHoverListener(Landroidx/appcompat/widget/MenuItemHoverListener;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/MenuPopupWindow;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
return-void
.end method
.method public setTouchModal(Z)V
.locals 4
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
if-gt v0, v1, :cond_0
sget-object v0, Landroidx/appcompat/widget/MenuPopupWindow;->sSetTouchModalMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_1
:try_start_0
iget-object v1, p0, Landroidx/appcompat/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
aput-object p1, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
const-string p1, "MenuPopupWindow"
const-string v0, "Could not invoke setTouchModal() on PopupWindow. Oh well."
invoke-static {p1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
invoke-virtual {v0, p1}, Landroid/widget/PopupWindow;->setTouchModal(Z)V
:cond_1
:goto_0
return-void
.end method