2020-07-08 16:44:49 +00:00
|
|
|
.class public final Lf/a/c/a;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "FloatingViewManager.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lf/a/c/a$a;,
|
|
|
|
Lf/a/c/a$b;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final a:Ljava/util/Map;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
"Lf/a/c/a$a;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final b:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/utilities/logging/Logger;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lf/a/c/a;->b:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lf/a/c/a;->a:Ljava/util/Map;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final a(Lf/a/c/a;Landroid/view/View;Landroid/view/View;Landroid/widget/FrameLayout;Lcom/discord/floating_view_manager/FloatingViewGravity;II)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p0, p2, p3}, Lf/a/c/a;->b(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
float-to-int v0, v0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p2, p3}, Lf/a/c/a;->c(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
float-to-int p0, p0
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getWidth()I
|
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
div-int/2addr p3, v1
|
|
|
|
|
|
|
|
add-int/2addr p3, v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
div-int/2addr v0, v1
|
|
|
|
|
|
|
|
sub-int/2addr p3, v0
|
|
|
|
|
|
|
|
add-int/2addr p3, p5
|
|
|
|
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result p4
|
|
|
|
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
|
|
|
|
const/4 p5, 0x1
|
|
|
|
|
|
|
|
if-eq p4, p5, :cond_1
|
|
|
|
|
|
|
|
if-ne p4, v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getHeight()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
add-int/2addr p2, p0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getHeight()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
div-int/2addr p2, v1
|
|
|
|
|
|
|
|
add-int/2addr p2, p0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
div-int/2addr p0, v1
|
|
|
|
|
|
|
|
sub-int/2addr p2, p0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
sub-int p2, p0, p2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
add-int/2addr p2, p6
|
|
|
|
|
|
|
|
int-to-float p0, p3
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Landroid/view/View;->setX(F)V
|
|
|
|
|
|
|
|
int-to-float p0, p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Landroid/view/View;->setY(F)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final b(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-ne v0, p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getX()F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getX()F
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
check-cast p1, Landroid/view/View;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lf/a/c/a;->b(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
|
|
|
|
const-string p2, "null cannot be cast to non-null type android.view.View"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final c(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-ne v0, p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getY()F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getY()F
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
check-cast p1, Landroid/view/View;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lf/a/c/a;->c(Landroid/view/View;Landroid/view/ViewGroup;)F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
|
|
|
|
const-string p2, "null cannot be cast to non-null type android.view.View"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final d(I)V
|
|
|
|
.locals 4
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/c/a;->a:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lf/a/c/a$a;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, v0, Lf/a/c/a$a;->b:Landroid/view/ViewGroup;
|
|
|
|
|
|
|
|
iget-object v2, v0, Lf/a/c/a$a;->a:Landroid/view/View;
|
|
|
|
|
2020-07-10 04:01:33 +00:00
|
|
|
iget-object v0, v0, Lf/a/c/a$a;->c:Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object v3, p0, Lf/a/c/a;->a:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v3, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/view/ViewGroup;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-10 04:01:33 +00:00
|
|
|
invoke-virtual {p1, v0}, Landroid/view/ViewTreeObserver;->removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|