apkfuckery/com.discord/smali/f/a/c/a.smali
2020-09-29 21:44:44 +00:00

203 lines
4.2 KiB
Smali

.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 1
const-string v0, "logger"
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
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;Lcom/discord/floating_view_manager/FloatingViewGravity;II)V
.locals 4
if-eqz p0, :cond_3
const/4 p0, 0x2
new-array v0, p0, [I
invoke-virtual {p2, v0}, Landroid/view/View;->getLocationInWindow([I)V
const/4 v1, 0x0
aget v1, v0, v1
const/4 v2, 0x1
aget v0, v0, v2
invoke-virtual {p2}, Landroid/view/View;->getWidth()I
move-result v3
div-int/2addr v3, p0
add-int/2addr v3, v1
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
move-result v1
div-int/2addr v1, p0
sub-int/2addr v3, v1
add-int/2addr v3, p4
invoke-virtual {p3}, Ljava/lang/Enum;->ordinal()I
move-result p3
if-eqz p3, :cond_2
if-eq p3, v2, :cond_1
if-ne p3, p0, :cond_0
invoke-virtual {p2}, Landroid/view/View;->getHeight()I
move-result p0
add-int/2addr p0, v0
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, p0
add-int/2addr p2, v0
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
move-result p3
div-int/2addr p3, p0
sub-int p0, p2, p3
goto :goto_0
:cond_2
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
move-result p0
sub-int p0, v0, p0
:goto_0
add-int/2addr p0, p5
int-to-float p2, v3
invoke-virtual {p1, p2}, Landroid/view/View;->setX(F)V
int-to-float p0, p0
invoke-virtual {p1, p0}, Landroid/view/View;->setY(F)V
return-void
:cond_3
const/4 p0, 0x0
throw p0
.end method
# virtual methods
.method public final b(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;
iget-object v0, v0, Lf/a/c/a$a;->c:Landroid/view/ViewTreeObserver$OnPreDrawListener;
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
invoke-virtual {p1, v0}, Landroid/view/ViewTreeObserver;->removeOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V
invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_0
return-void
.end method