332 lines
12 KiB
Smali
332 lines
12 KiB
Smali
.class public final Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;
|
|
.super Lj0/k/h/a/g;
|
|
.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 = {
|
|
"Lj0/k/h/a/g;",
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
"Lkotlinx/coroutines/CoroutineScope;",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Ljava/lang/Object;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lj0/k/h/a/d;
|
|
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
|
|
|
|
.field public p$:Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
|
|
# 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
|
|
|
|
invoke-direct {p0, p1, p4}, Lj0/k/h/a/g;-><init>(ILkotlin/coroutines/Continuation;)V
|
|
|
|
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
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
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
|
|
|
|
:cond_0
|
|
const-string p1, "completion"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.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;
|
|
.locals 6
|
|
|
|
sget-object v0, Lj0/k/g/a;->d:Lj0/k/g/a;
|
|
|
|
iget v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->label:I
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$1:Ljava/lang/Object;
|
|
|
|
check-cast v0, Landroid/graphics/Bitmap;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$0:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
invoke-static {p1}, Lf/m/b/f/a;->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/m/b/f/a;->throwOnFailure(Ljava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->p$:Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColors$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Ljava/util/HashMap;
|
|
|
|
move-result-object v1
|
|
|
|
iget-wide v3, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
|
|
|
|
new-instance v5, Ljava/lang/Long;
|
|
|
|
invoke-direct {v5, v3, v4}, Ljava/lang/Long;-><init>(J)V
|
|
|
|
invoke-interface {v1, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$bitmap:Landroid/graphics/Bitmap;
|
|
|
|
sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v3, v4}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
|
|
|
|
const-string v4, "copiedBitmap"
|
|
|
|
invoke-static {v1, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$0:Ljava/lang/Object;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->L$1:Ljava/lang/Object;
|
|
|
|
iput v2, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->label:I
|
|
|
|
invoke-virtual {v3, v1, p0}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->getRepresentativeColorAsync(Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
if-ne p1, v0, :cond_3
|
|
|
|
return-object v0
|
|
|
|
:cond_3
|
|
:goto_0
|
|
check-cast p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult;
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Success;->getColor()I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getBLURPLE$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)I
|
|
|
|
move-result v0
|
|
|
|
:goto_1
|
|
instance-of v1, p1, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$RepresentativeColorResult$Failure;
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
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
|
|
|
|
iget-wide v2, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Lkotlin/Pair;
|
|
|
|
const-string v4, "userId"
|
|
|
|
invoke-direct {v3, v4, v2}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
invoke-static {v3}, Lf/m/b/f/a;->mapOf(Lkotlin/Pair;)Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Failed to get representative color for user"
|
|
|
|
invoke-virtual {v1, v3, p1, v2}, Lcom/discord/app/AppLog;->e(Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;)V
|
|
|
|
: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;
|
|
|
|
move-result-object p1
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors$handleBitmap$1;->$userId:J
|
|
|
|
new-instance v3, Ljava/lang/Long;
|
|
|
|
invoke-direct {v3, v1, v2}, Ljava/lang/Long;-><init>(J)V
|
|
|
|
new-instance v1, Ljava/lang/Integer;
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/Integer;-><init>(I)V
|
|
|
|
invoke-interface {p1, v3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
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$getRepresentativeColorsSubject$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;->access$getRepresentativeColors$p(Lcom/discord/widgets/voice/fullscreen/UserRepresentativeColors;)Ljava/util/HashMap;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
|
|
:cond_6
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|