2020-05-17 12:40:10 +00:00
|
|
|
.class public final Landroidx/core/widget/PopupWindowCompat;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "PopupWindowCompat.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final TAG:Ljava/lang/String; = "PopupWindowCompatApi21"
|
|
|
|
|
|
|
|
.field public static sGetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
.field public static sGetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
.field public static sOverlapAnchorField:Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
.field public static sOverlapAnchorFieldAttempted:Z
|
|
|
|
|
|
|
|
.field public static sSetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
.field public static sSetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static getOverlapAnchor(Landroid/widget/PopupWindow;)Z
|
|
|
|
.locals 4
|
|
|
|
.param p0 # Landroid/widget/PopupWindow;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x17
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/PopupWindow;->getOverlapAnchor()Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorFieldAttempted:Z
|
|
|
|
|
|
|
|
const-string v1, "PopupWindowCompatApi21"
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-class v2, Landroid/widget/PopupWindow;
|
|
|
|
|
|
|
|
const-string v3, "mOverlapAnchor"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
sput-object v2, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorField:Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/reflect/Field;->setAccessible(Z)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v2
|
|
|
|
|
|
|
|
const-string v3, "Could not fetch mOverlapAnchor field from PopupWindow"
|
|
|
|
|
|
|
|
invoke-static {v1, v3, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sput-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorFieldAttempted:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorField:Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
const-string v0, "Could not get overlap anchor field in PopupWindow"
|
|
|
|
|
|
|
|
invoke-static {v1, v0, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static getWindowLayoutType(Landroid/widget/PopupWindow;)I
|
|
|
|
.locals 5
|
|
|
|
.param p0 # Landroid/widget/PopupWindow;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x17
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/PopupWindow;->getWindowLayoutType()I
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sGetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-class v2, Landroid/widget/PopupWindow;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v3, "getWindowLayoutType"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-array v4, v1, [Ljava/lang/Class;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2, v3, v4}, 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 v2
|
|
|
|
|
|
|
|
sput-object v2, Landroidx/core/widget/PopupWindowCompat;->sGetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
sput-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sGetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Landroidx/core/widget/PopupWindowCompat;->sGetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_start_1
|
2020-05-17 12:40:10 +00:00
|
|
|
new-array v2, v1, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Ljava/lang/Integer;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result p0
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
:cond_2
|
|
|
|
return v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setOverlapAnchor(Landroid/widget/PopupWindow;Z)V
|
|
|
|
.locals 4
|
|
|
|
.param p0 # Landroid/widget/PopupWindow;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x17
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/PopupWindow;->setOverlapAnchor(Z)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorFieldAttempted:Z
|
|
|
|
|
|
|
|
const-string v1, "PopupWindowCompatApi21"
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-class v2, Landroid/widget/PopupWindow;
|
|
|
|
|
|
|
|
const-string v3, "mOverlapAnchor"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
sput-object v2, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorField:Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/reflect/Field;->setAccessible(Z)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v2
|
|
|
|
|
|
|
|
const-string v3, "Could not fetch mOverlapAnchor field from PopupWindow"
|
|
|
|
|
|
|
|
invoke-static {v1, v3, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sput-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorFieldAttempted:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Landroidx/core/widget/PopupWindowCompat;->sOverlapAnchorField:Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0, p1}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
const-string p1, "Could not set overlap anchor field in PopupWindow"
|
|
|
|
|
|
|
|
invoke-static {v1, p1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setWindowLayoutType(Landroid/widget/PopupWindow;I)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 6
|
2020-05-17 12:40:10 +00:00
|
|
|
.param p0 # Landroid/widget/PopupWindow;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x17
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/PopupWindow;->setWindowLayoutType(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-boolean v0, Landroidx/core/widget/PopupWindowCompat;->sSetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-class v0, Landroid/widget/PopupWindow;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v3, "setWindowLayoutType"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-array v4, v2, [Ljava/lang/Class;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
aput-object v5, v4, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v3, v4}, 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/core/widget/PopupWindowCompat;->sSetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
sput-boolean v2, Landroidx/core/widget/PopupWindowCompat;->sSetWindowLayoutTypeMethodAttempted:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Landroidx/core/widget/PopupWindowCompat;->sSetWindowLayoutTypeMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_start_1
|
2020-05-17 12:40:10 +00:00
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
aput-object p1, v2, v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
2020-07-08 16:44:49 +00:00
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_1
|
|
|
|
:cond_2
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static showAsDropDown(Landroid/widget/PopupWindow;Landroid/view/View;III)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
.param p0 # Landroid/widget/PopupWindow;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/view/View;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/PopupWindow;->showAsDropDown(Landroid/view/View;III)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|