apkfuckery/com.discord/smali_classes2/com/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1.smali

317 lines
11 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +00:00
.class public final Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;
2020-11-14 03:19:56 +00:00
.super Ly/j/h/a/g;
2020-11-12 02:11:44 +00:00
.source "UserRepresentativeColors.kt"
# interfaces
.implements Lkotlin/jvm/functions/Function2;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->handleBitmap(JLandroid/graphics/Bitmap;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
2020-11-14 03:19:56 +00:00
"Ly/j/h/a/g;",
2020-11-12 02:11:44 +00:00
"Lkotlin/jvm/functions/Function2<",
"Lkotlinx/coroutines/CoroutineScope;",
"Lkotlin/coroutines/Continuation<",
"-",
"Lkotlin/Unit;",
">;",
"Ljava/lang/Object;",
">;"
}
.end annotation
2020-11-14 03:19:56 +00:00
.annotation runtime Ly/j/h/a/d;
2020-11-12 02:11:44 +00:00
c = "com.discord.widgets.voice.fullscreen.UserRepresentativeColors$handleBitmap$1"
f = "UserRepresentativeColors.kt"
l = {
0x2c
}
m = "invokeSuspend"
.end annotation
# instance fields
.field public final synthetic $bitmap:Landroid/graphics/Bitmap;
.field public final synthetic $userId:J
.field public L$0:Ljava/lang/Object;
.field public L$1:Ljava/lang/Object;
.field public label:I
2020-11-14 03:19:56 +00:00
.field private p$:Lkotlinx/coroutines/CoroutineScope;
2020-11-12 02:11:44 +00:00
# direct methods
.method public constructor <init>(JLandroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)V
.locals 0
iput-wide p1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
iput-object p3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$bitmap:Landroid/graphics/Bitmap;
const/4 p1, 0x2
2020-11-14 03:19:56 +00:00
invoke-direct {p0, p1, p4}, Ly/j/h/a/g;-><init>(ILkotlin/coroutines/Continuation;)V
2020-11-12 02:11:44 +00:00
return-void
.end method
# virtual methods
.method public final create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlin/coroutines/Continuation<",
"*>;)",
"Lkotlin/coroutines/Continuation<",
"Lkotlin/Unit;",
">;"
}
.end annotation
const-string v0, "completion"
2020-11-14 03:19:56 +00:00
invoke-static {p2, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
new-instance v0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;
iget-wide v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
iget-object v3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$bitmap:Landroid/graphics/Bitmap;
invoke-direct {v0, v1, v2, v3, p2}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;-><init>(JLandroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)V
check-cast p1, Lkotlinx/coroutines/CoroutineScope;
iput-object p1, v0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->p$:Lkotlinx/coroutines/CoroutineScope;
return-object v0
.end method
.method public final invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
check-cast p2, Lkotlin/coroutines/Continuation;
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object p1
check-cast p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;
sget-object p2, Lkotlin/Unit;->a:Lkotlin/Unit;
invoke-virtual {p1, p2}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
2020-11-14 03:19:56 +00:00
.locals 8
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
sget-object v1, Ly/j/g/a;->d:Ly/j/g/a;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget v2, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->label:I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const/4 v3, 0x1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eqz v2, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-ne v2, v3, :cond_0
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$1:Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
check-cast v1, Landroid/graphics/Bitmap;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$0:Ljava/lang/Object;
check-cast v1, Lkotlinx/coroutines/CoroutineScope;
2020-11-12 02:11:44 +00:00
invoke-static {p1}, Lf/h/a/f/f/n/f;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
invoke-static {p1}, Lf/h/a/f/f/n/f;->throwOnFailure(Ljava/lang/Object;)V
iget-object p1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->p$:Lkotlinx/coroutines/CoroutineScope;
2020-11-14 03:19:56 +00:00
sget-object v2, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {v2}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColors$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Ljava/util/HashMap;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result-object v4
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget-wide v5, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
new-instance v7, Ljava/lang/Long;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-direct {v7, v5, v6}, Ljava/lang/Long;-><init>(J)V
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-interface {v4, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result v4
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eqz v4, :cond_2
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
return-object v0
2020-11-12 02:11:44 +00:00
:cond_2
2020-11-14 03:19:56 +00:00
iget-object v4, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$bitmap:Landroid/graphics/Bitmap;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
sget-object v5, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const/4 v6, 0x0
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-virtual {v4, v5, v6}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result-object v4
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const-string v5, "copiedBitmap"
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {v4, v5}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$0:Ljava/lang/Object;
2020-11-14 03:19:56 +00:00
iput-object v4, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$1:Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iput v3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->label:I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-virtual {v2, v4, p0}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->getRepresentativeColorAsync(Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
move-result-object p1
2020-11-14 03:19:56 +00:00
if-ne p1, v1, :cond_3
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
return-object v1
2020-11-12 02:11:44 +00:00
:cond_3
:goto_0
check-cast p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult;
2020-11-14 03:19:56 +00:00
instance-of v1, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eqz v1, :cond_4
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-object v1, p1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
check-cast v1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;->getColor()I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result v1
2020-11-12 02:11:44 +00:00
goto :goto_1
:cond_4
2020-11-14 03:19:56 +00:00
instance-of v1, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eqz v1, :cond_6
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
sget-object v1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {v1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getBLURPLE$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result v1
2020-11-12 02:11:44 +00:00
:goto_1
2020-11-14 03:19:56 +00:00
instance-of v2, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eqz v2, :cond_5
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
sget-object v2, Lcom/discord/app/AppLog;->e:Lcom/discord/app/AppLog;
2020-11-12 02:11:44 +00:00
check-cast p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;->getException()Ljava/lang/Exception;
move-result-object p1
2020-11-14 03:19:56 +00:00
iget-wide v3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {v3, v4}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result-object v3
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
new-instance v4, Lkotlin/Pair;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const-string v5, "userId"
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-direct {v4, v5, v3}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {v4}, Lf/h/a/f/f/n/f;->mapOf(Lkotlin/Pair;)Ljava/util/Map;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result-object v3
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const-string v4, "Failed to get representative color for user"
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-virtual {v2, v4, p1, v3}, Lcom/discord/app/AppLog;->e(Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;)V
2020-11-12 02:11:44 +00:00
:cond_5
sget-object p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
invoke-static {p1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColors$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Ljava/util/HashMap;
2020-11-14 03:19:56 +00:00
move-result-object v2
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget-wide v3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
new-instance v5, Ljava/lang/Long;
2020-11-14 02:19:59 +00:00
2020-11-14 03:19:56 +00:00
invoke-direct {v5, v3, v4}, Ljava/lang/Long;-><init>(J)V
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
new-instance v3, Ljava/lang/Integer;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-direct {v3, v1}, Ljava/lang/Integer;-><init>(I)V
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
invoke-static {p1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColorsSubject$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Lrx/subjects/BehaviorSubject;
2020-11-14 03:19:56 +00:00
move-result-object v1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-static {p1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColors$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Ljava/util/HashMap;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
move-result-object p1
2020-11-14 02:19:59 +00:00
2020-11-14 03:19:56 +00:00
invoke-virtual {v1, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
2020-11-14 02:19:59 +00:00
2020-11-14 03:19:56 +00:00
return-object v0
2020-11-12 02:11:44 +00:00
:cond_6
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
throw p1
.end method