apkfuckery/com.discord/smali/f/a/c/a.smali

211 lines
4.2 KiB
Smali
Raw Normal View History

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
2020-07-14 22:43:59 +00:00
if-eqz p1, :cond_0
2020-07-08 16:44:49 +00:00
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
2020-07-14 22:43:59 +00:00
:cond_0
const-string p1, "logger"
2020-07-25 00:57:58 +00:00
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
2020-07-14 22:43:59 +00:00
const/4 p1, 0x0
throw p1
2020-07-08 16:44:49 +00:00
.end method
2020-07-14 22:43:59 +00:00
.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
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
if-eqz p0, :cond_3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
const/4 p0, 0x2
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
new-array v0, p0, [I
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {p2, v0}, Landroid/view/View;->getLocationInWindow([I)V
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
const/4 v1, 0x0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
aget v1, v0, v1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
const/4 v2, 0x1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
aget v0, v0, v2
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {p2}, Landroid/view/View;->getWidth()I
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
move-result v3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
div-int/2addr v3, p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
add-int/2addr v3, v1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
move-result v1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
div-int/2addr v1, p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
sub-int/2addr v3, v1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
add-int/2addr v3, p4
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {p3}, Ljava/lang/Enum;->ordinal()I
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
move-result p3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
if-eqz p3, :cond_2
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
if-eq p3, v2, :cond_1
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
if-ne p3, p0, :cond_0
2020-07-08 16:44:49 +00:00
invoke-virtual {p2}, Landroid/view/View;->getHeight()I
2020-07-14 22:43:59 +00:00
move-result p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
add-int/2addr p0, v0
2020-07-08 16:44:49 +00:00
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
2020-07-14 22:43:59 +00:00
div-int/2addr p2, p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
add-int/2addr p2, v0
2020-07-08 16:44:49 +00:00
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
2020-07-14 22:43:59 +00:00
move-result p3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
div-int/2addr p3, p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
sub-int p0, p2, p3
2020-07-08 16:44:49 +00:00
goto :goto_0
:cond_2
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
2020-07-14 22:43:59 +00:00
move-result p0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
sub-int p0, v0, p0
2020-07-08 16:44:49 +00:00
:goto_0
2020-07-14 22:43:59 +00:00
add-int/2addr p0, p5
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
int-to-float p2, v3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {p1, p2}, Landroid/view/View;->setX(F)V
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
int-to-float p0, p0
2020-07-08 16:44:49 +00:00
invoke-virtual {p1, p0}, Landroid/view/View;->setY(F)V
return-void
2020-07-14 22:43:59 +00:00
:cond_3
const/4 p0, 0x0
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
throw p0
2020-07-08 16:44:49 +00:00
.end method
2020-07-14 22:43:59 +00:00
# virtual methods
.method public final b(I)V
2020-07-08 16:44:49 +00:00
.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-14 22:43:59 +00:00
iget-object v0, v0, Lf/a/c/a$a;->c:Landroid/view/ViewTreeObserver$OnPreDrawListener;
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-14 22:43:59 +00:00
invoke-virtual {p1, v0}, Landroid/view/ViewTreeObserver;->removeOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)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